GAE prod and dev support for datastore

Fixes #104.
> Looking back on this, we can use defineProperty to allow dynamic analysis
of the env vars:
Or we can have a helper env var getter function to mock. Less magical.

On Sun, Sep 7, 2014 at 8:51 AM, Stephen Sawchuk <notifications@github.com>
wrote:

> In lib/common/gae.js:
>
> > + * Unless required by applicable law or agreed to in writing, software
> > + * distributed under the License is distributed on an "AS IS" BASIS,
> > + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > + * See the License for the specific language governing permissions and
> > + * limitations under the License.
> > + */
> > +
> > +/**
> > + * @private
> > + */
> > +
> > +'use strict';
> > +
> > +var gae = {};
> > +
> > +gae.info = function() {
>
> Looking back on this, we can use defineProperty to allow dynamic analysis
> of the env vars:
>
> var gae = {};
> Object.defineProperty(gae, 'info', {
>   get: function() {
>     if (!process.env.GAE_LONG_APP_ID) {
>       return null;
>     }
>     return {
>       id: process.env.GAE_LONG_APP_ID,
>       isProd: process.env.GAE_VM !== undefined
>     };
>   }});
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/gcloud-node/pull/154/files#r17215369>
> .
>



-- 
Burcu Dogan