Merge pull request #3168 from stanley-cheung/php_routeguide_package_name

php: change routeguide package name
diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc
index 875599e..605fb7f 100644
--- a/examples/cpp/helloworld/greeter_async_client.cc
+++ b/examples/cpp/helloworld/greeter_async_client.cc
@@ -41,7 +41,7 @@
 #include <grpc++/client_context.h>
 #include <grpc++/completion_queue.h>
 #include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
 #include "helloworld.grpc.pb.h"
 
 using grpc::Channel;
diff --git a/examples/cpp/helloworld/greeter_async_server.cc b/examples/cpp/helloworld/greeter_async_server.cc
index b8a0dbf..189c3af 100644
--- a/examples/cpp/helloworld/greeter_async_server.cc
+++ b/examples/cpp/helloworld/greeter_async_server.cc
@@ -39,10 +39,10 @@
 #include <grpc/grpc.h>
 #include <grpc/support/log.h>
 #include <grpc++/completion_queue.h>
+#include <grpc++/security/server_credentials.h>
 #include <grpc++/server.h>
 #include <grpc++/server_builder.h>
 #include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
 #include "helloworld.grpc.pb.h"
 
 using grpc::Server;
diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc
index 3d2fcba..bfb7c12 100644
--- a/examples/cpp/helloworld/greeter_client.cc
+++ b/examples/cpp/helloworld/greeter_client.cc
@@ -39,7 +39,7 @@
 #include <grpc++/channel.h>
 #include <grpc++/client_context.h>
 #include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
 #include "helloworld.grpc.pb.h"
 
 using grpc::Channel;
diff --git a/examples/cpp/helloworld/greeter_server.cc b/examples/cpp/helloworld/greeter_server.cc
index c1efdf5..b434752 100644
--- a/examples/cpp/helloworld/greeter_server.cc
+++ b/examples/cpp/helloworld/greeter_server.cc
@@ -36,10 +36,10 @@
 #include <string>
 
 #include <grpc/grpc.h>
+#include <grpc++/security/server_credentials.h>
 #include <grpc++/server.h>
 #include <grpc++/server_builder.h>
 #include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
 #include "helloworld.grpc.pb.h"
 
 using grpc::Server;
diff --git a/examples/cpp/route_guide/helper.cc b/examples/cpp/route_guide/helper.cc
index c2415af..f76990f 100644
--- a/examples/cpp/route_guide/helper.cc
+++ b/examples/cpp/route_guide/helper.cc
@@ -40,7 +40,7 @@
 #include <vector>
 #include "route_guide.grpc.pb.h"
 
-namespace examples {
+namespace routeguide {
 
 std::string GetDbFileContent(int argc, char** argv) {
   std::string db_path;
@@ -174,5 +174,5 @@
 }
 
 
-}  // namespace examples
+}  // namespace routeguide
 
diff --git a/examples/cpp/route_guide/helper.h b/examples/cpp/route_guide/helper.h
index 65c93c1..db36596 100644
--- a/examples/cpp/route_guide/helper.h
+++ b/examples/cpp/route_guide/helper.h
@@ -37,14 +37,14 @@
 #include <string>
 #include <vector>
 
-namespace examples {
+namespace routeguide {
 class Feature;
 
 std::string GetDbFileContent(int argc, char** argv);
 
 void ParseDb(const std::string& db, std::vector<Feature>* feature_list);
 
-}  // namespace examples
+}  // namespace routeguide
 
 #endif  // GRPC_COMMON_CPP_ROUTE_GUIDE_HELPER_H_
 
diff --git a/examples/cpp/route_guide/route_guide_client.cc b/examples/cpp/route_guide/route_guide_client.cc
index ec0a75e..85173a3 100644
--- a/examples/cpp/route_guide/route_guide_client.cc
+++ b/examples/cpp/route_guide/route_guide_client.cc
@@ -42,7 +42,7 @@
 #include <grpc++/channel.h>
 #include <grpc++/client_context.h>
 #include <grpc++/create_channel.h>
-#include <grpc++/credentials.h>
+#include <grpc++/security/credentials.h>
 #include "helper.h"
 #include "route_guide.grpc.pb.h"
 
@@ -52,12 +52,12 @@
 using grpc::ClientReaderWriter;
 using grpc::ClientWriter;
 using grpc::Status;
-using examples::Point;
-using examples::Feature;
-using examples::Rectangle;
-using examples::RouteSummary;
-using examples::RouteNote;
-using examples::RouteGuide;
+using routeguide::Point;
+using routeguide::Feature;
+using routeguide::Rectangle;
+using routeguide::RouteSummary;
+using routeguide::RouteNote;
+using routeguide::RouteGuide;
 
 Point MakePoint(long latitude, long longitude) {
   Point p;
@@ -86,7 +86,7 @@
  public:
   RouteGuideClient(std::shared_ptr<Channel> channel, const std::string& db)
       : stub_(RouteGuide::NewStub(channel)) {
-    examples::ParseDb(db, &feature_list_);
+    routeguide::ParseDb(db, &feature_list_);
   }
 
   void GetFeature() {
@@ -99,7 +99,7 @@
   }
 
   void ListFeatures() {
-    examples::Rectangle rect;
+    routeguide::Rectangle rect;
     Feature feature;
     ClientContext context;
 
@@ -232,7 +232,7 @@
 
 int main(int argc, char** argv) {
   // Expect only arg: --db_path=path/to/route_guide_db.json.
-  std::string db = examples::GetDbFileContent(argc, argv);
+  std::string db = routeguide::GetDbFileContent(argc, argv);
   RouteGuideClient guide(
       grpc::CreateChannel("localhost:50051", grpc::InsecureCredentials()),
       db);
diff --git a/examples/cpp/route_guide/route_guide_server.cc b/examples/cpp/route_guide/route_guide_server.cc
index b375392..2be5742 100644
--- a/examples/cpp/route_guide/route_guide_server.cc
+++ b/examples/cpp/route_guide/route_guide_server.cc
@@ -42,7 +42,7 @@
 #include <grpc++/server.h>
 #include <grpc++/server_builder.h>
 #include <grpc++/server_context.h>
-#include <grpc++/server_credentials.h>
+#include <grpc++/security/server_credentials.h>
 #include "helper.h"
 #include "route_guide.grpc.pb.h"
 
@@ -53,12 +53,12 @@
 using grpc::ServerReaderWriter;
 using grpc::ServerWriter;
 using grpc::Status;
-using examples::Point;
-using examples::Feature;
-using examples::Rectangle;
-using examples::RouteSummary;
-using examples::RouteNote;
-using examples::RouteGuide;
+using routeguide::Point;
+using routeguide::Feature;
+using routeguide::Rectangle;
+using routeguide::RouteSummary;
+using routeguide::RouteNote;
+using routeguide::RouteGuide;
 using std::chrono::system_clock;
 
 
@@ -99,7 +99,7 @@
 class RouteGuideImpl final : public RouteGuide::Service {
  public:
   explicit RouteGuideImpl(const std::string& db) {
-    examples::ParseDb(db, &feature_list_);
+    routeguide::ParseDb(db, &feature_list_);
   }
 
   Status GetFeature(ServerContext* context, const Point* point,
@@ -110,7 +110,7 @@
   }
 
   Status ListFeatures(ServerContext* context,
-                      const examples::Rectangle* rectangle,
+                      const routeguide::Rectangle* rectangle,
                       ServerWriter<Feature>* writer) override {
     auto lo = rectangle->lo();
     auto hi = rectangle->hi();
@@ -195,7 +195,7 @@
 
 int main(int argc, char** argv) {
   // Expect only arg: --db_path=path/to/route_guide_db.json.
-  std::string db = examples::GetDbFileContent(argc, argv);
+  std::string db = routeguide::GetDbFileContent(argc, argv);
   RunServer(db);
 
   return 0;
diff --git a/examples/protos/route_guide.proto b/examples/protos/route_guide.proto
index bfde5f1..7a70040 100644
--- a/examples/protos/route_guide.proto
+++ b/examples/protos/route_guide.proto
@@ -32,7 +32,7 @@
 option java_package = "ex.grpc";
 option objc_class_prefix = "RTG";
 
-package examples;
+package routeguide;
 
 // Interface exported by the server.
 service RouteGuide {
diff --git a/src/node/README.md b/src/node/README.md
index c96bc96..0b97680 100644
--- a/src/node/README.md
+++ b/src/node/README.md
@@ -1,7 +1,7 @@
 # Node.js gRPC Library
 
 ## Status
-Alpha : Ready for early adopters
+Beta
 
 ## PREREQUISITES
 - `node`: This requires `node` to be installed. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package.
diff --git a/src/node/package.json b/src/node/package.json
index 756d41b..bb8987c 100644
--- a/src/node/package.json
+++ b/src/node/package.json
@@ -1,6 +1,6 @@
 {
   "name": "grpc",
-  "version": "0.10.0",
+  "version": "0.11.0",
   "author": "Google Inc.",
   "description": "gRPC Library for Node",
   "homepage": "http://www.grpc.io/",
diff --git a/src/ruby/.rspec b/src/ruby/.rspec
index 2320752..efeee2c 100755
--- a/src/ruby/.rspec
+++ b/src/ruby/.rspec
@@ -1,5 +1,6 @@
 -I.
 -Ipb
+--backtrace
 --require spec_helper
 --format documentation
 --color
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index 38ea333..3740ac5 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -417,18 +417,18 @@
         begin
           an_rpc = @server.request_call(@cq, loop_tag, INFINITE_FUTURE)
           c = new_active_server_call(an_rpc)
+          unless c.nil?
+            mth = an_rpc.method.to_sym
+            @pool.schedule(c) do |call|
+              rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
+            end
+          end
         rescue Core::CallError, RuntimeError => e
           # these might happen for various reasonse.  The correct behaviour of
           # the server is to log them and continue, if it's not shutting down.
           GRPC.logger.warn("server call failed: #{e}") unless stopped?
           next
         end
-        unless c.nil?
-          mth = an_rpc.method.to_sym
-          @pool.schedule(c) do |call|
-            rpc_descs[mth].run_server_method(call, rpc_handlers[mth])
-          end
-        end
       end
       @running = false
       GRPC.logger.info("stopped: #{self}")
diff --git a/src/ruby/spec/client_server_spec.rb b/src/ruby/spec/client_server_spec.rb
index 387f2ba..ad0fb26 100644
--- a/src/ruby/spec/client_server_spec.rb
+++ b/src/ruby/spec/client_server_spec.rb
@@ -28,7 +28,6 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 require 'grpc'
-require 'spec_helper'
 
 include GRPC::Core
 
@@ -41,7 +40,7 @@
   end
 
   def deadline
-    Time.now + 2
+    Time.now + 5
   end
 
   def server_allows_client_to_proceed
diff --git a/src/ruby/spec/pb/health/checker_spec.rb b/src/ruby/spec/pb/health/checker_spec.rb
index d7b7535..9bc8263 100644
--- a/src/ruby/spec/pb/health/checker_spec.rb
+++ b/src/ruby/spec/pb/health/checker_spec.rb
@@ -179,7 +179,6 @@
 
   describe 'running on RpcServer' do
     RpcServer = GRPC::RpcServer
-    StatusCodes = GRPC::Core::StatusCodes
     CheckerStub = Grpc::Health::Checker.rpc_stub_class
 
     before(:each) do