Run screen.rb
Run client.rb
Try it out
write "Hello"
# -*- coding: utf-8 -*- | |
# | |
# Copyright 2019 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# |
source "https://rubygems.org" | |
gemspec |
# Copyright 2019 Google LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
Polyfill to support authoring samples in separate files (not in the _gapic config)
This feature is currently in development – this script lets you try it out today!
See also: include_samples polyfill for running sample tests for library repos
#! /usr/bin/env ruby | |
# Script for my local code sample development. | |
# | |
# Merged individual samples into speech_gapic.yaml | |
# | |
# Shim for upcoming change (samples will be in separate files) | |
# | |
# Note: the exact formatting of the individual files is subject to change |
SynthTool PR: Add include_samples=True #263
Polyfill to support generating samples with tests w/ SynthTool
This feature is currently in development – this script lets you try it out today!
The GAPIC-generator "monolith" should support loading samples for generation from multiple YAML files.
Ideally we can simplify the YAML a little tiny bit when we do this.
Here are my thoughts.
Current Sample Config (v1) .yaml
and
# clone Java google cloud client libraries repo and cd into the google cloud language library folder
git clone https://github.com/googleapis/google-cloud-java.git
cd google-cloud-java/
cd google-cloud-clients/google-cloud/language/
# update synth.py so it generates samples/v1/ directory
https://gist.githubusercontent.com/beccasaurus/487a6b089d0bfc97c8b48f77c45f5c2e/raw/2e3da0eaff96921adf6b1f6d38af9a0bd10e11f1/synth.py
vi /etc/default/keyboard
XKBOPTIONS="altwin:ctrl_win"