Example #1
0
    artman_output_name='google-cloud-ruby/google-cloud-kms',
    config_path='artman_cloudkms.yaml')
s.copy(v1_library / 'lib')
s.copy(v1_library / 'test')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-kms.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-kms.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# PERMANENT: API name for cloudkms
s.replace(
    ['README.md', 'lib/google/cloud/kms.rb', 'lib/google/cloud/kms/v1.rb'],
    '/kms\\.googleapis\\.com', '/cloudkms.googleapis.com')

# PERMANENT: Add sample to readme
s.replace(
    'README.md', '### Next Steps\n',
    dedent("""\
      ### Example
Example #2
0
v1beta2_library = gapic.ruby_library(
    'videointelligence', 'v1beta2',
    artman_output_name='google-cloud-ruby/google-cloud-video_intelligence'
)
s.copy(v1beta2_library / 'lib/google/cloud/video_intelligence/v1beta2')
s.copy(v1beta2_library / 'lib/google/cloud/video_intelligence/v1beta2.rb')
s.copy(v1beta2_library / 'lib/google/cloud/videointelligence/v1beta2')
s.copy(v1beta2_library / 'test/google/cloud/video_intelligence/v1beta2')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-video_intelligence.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# Support for service_address
s.replace(
    [
        'lib/google/cloud/video_intelligence.rb',
        'lib/google/cloud/video_intelligence/v*.rb',
        'lib/google/cloud/video_intelligence/v*/*_client.rb'
    ],
Example #3
0
    'monitoring', 'v1',
    config_path='/google/monitoring/dashboard/v1/artman_monitoring.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-monitoring'
)
s.copy(v1_dashboard_library / 'lib/google/cloud/monitoring/dashboard.rb')
s.copy(v1_dashboard_library / 'lib/google/cloud/monitoring/dashboard/v1')
s.copy(v1_dashboard_library / 'lib/google/cloud/monitoring/dashboard/v1.rb')
s.copy(v1_dashboard_library / 'lib/google/monitoring/dashboard/v1')
s.copy(v1_dashboard_library / 'test/google/cloud/monitoring/dashboard/v1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-monitoring.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# Update Authentication Guide for multi-service clients
s.replace(
    'AUTHENTICATION.md',
    'Google::Cloud::Monitoring.new',
    'Google::Cloud::Monitoring::AlertPolicy.new'
)
Example #4
0
    artman_output_name='google-cloud-ruby/google-cloud-irm',
    config_path='artman_irm_v1alpha2.yaml')
s.copy(v1alpha2 / 'lib')
s.copy(v1alpha2 / 'test')
s.copy(v1alpha2 / 'README.md')
s.copy(v1alpha2 / 'LICENSE')
s.copy(v1alpha2 / '.gitignore')
s.copy(v1alpha2 / '.yardopts')
s.copy(v1alpha2 / 'google-cloud-irm.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-irm.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/irm.rb', 'lib/google/cloud/irm/v*.rb',
        'lib/google/cloud/irm/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #5
0
    '/google/devtools/containeranalysis/artman_containeranalysis_v1.yaml')

s.copy(v1_library / 'lib')
s.copy(v1_library / 'test')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-container_analysis.gemspec',
       merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-container_analysis.gemspec')

# Hack grpc service class name and location
s.replace(
    'lib/google/devtools/containeranalysis/v1/containeranalysis_services_pb.rb',
    '  module ContainerAnalysis\n', '  module ContainerAnalysisService\n')
s.replace([
    'lib/google/cloud/container_analysis/v1/container_analysis_client.rb',
    'test/google/cloud/container_analysis/v1/container_analysis_client_test.rb'
], 'Google::Devtools::Containeranalysis::V1::ContainerAnalysis::',
          'Google::Cloud::ContainerAnalysis::V1::ContainerAnalysisService::')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/container_analysis.rb',
Example #6
0
v1p3beta1 = gapic.ruby_library(
    'vision', 'v1p3beta1',
    artman_output_name='google-cloud-ruby/google-cloud-vision'
)
s.copy(v1p3beta1 / 'lib/google/cloud/vision/v1p3beta1')
s.copy(v1p3beta1 / 'lib/google/cloud/vision/v1p3beta1.rb')
s.copy(v1p3beta1 / 'acceptance/google/cloud/vision/v1p3beta1')
s.copy(v1p3beta1 / 'test/google/cloud/vision/v1p3beta1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-vision.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# Update Authentication Guide for multi-service clients
s.replace(
    'AUTHENTICATION.md',
    'Google::Cloud::Vision.new',
    'Google::Cloud::Vision::ImageAnnotator.new'
)
Example #7
0
# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

v1beta_library = gapic.ruby_library(
    'oslogin', 'v1beta',
    config_path='/google/cloud/oslogin/artman_oslogin_v1beta.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-os_login'
)
s.copy(v1beta_library / 'lib/google/cloud/os_login/v1beta')
s.copy(v1beta_library / 'lib/google/cloud/os_login/v1beta.rb')
s.copy(v1beta_library / 'lib/google/cloud/oslogin/v1beta')
s.copy(v1beta_library / 'test/google/cloud/os_login/v1beta')

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-os_login.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# PERMANENT: API name for oslogin
s.replace(
    [
      'README.md',
      'lib/google/cloud/os_login.rb',
      'lib/google/cloud/os_login/v1.rb',
      'lib/google/cloud/os_login/v1beta.rb'
Example #8
0
v1beta1_library = gapic.ruby_library(
    'asset',
    'v1beta1',
    artman_output_name='google-cloud-ruby/google-cloud-asset',
    config_path='artman_cloudasset_v1beta1.yaml')
s.copy(v1beta1_library / 'lib/google/cloud/asset/v1beta1.rb')
s.copy(v1beta1_library / 'lib/google/cloud/asset/v1beta1')
s.copy(v1beta1_library / 'test/google/cloud/asset/v1beta1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-asset.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/asset.rb', 'lib/google/cloud/asset/v*.rb',
        'lib/google/cloud/asset/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #9
0
# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

v1p1beta1_library = gapic.ruby_library(
    'speech', 'v1p1beta1',
    artman_output_name='google-cloud-ruby/google-cloud-speech'
)
s.copy(v1p1beta1_library / 'acceptance')
s.copy(v1p1beta1_library / 'lib/google/cloud/speech/v1p1beta1.rb')
s.copy(v1p1beta1_library / 'lib/google/cloud/speech/v1p1beta1')
s.copy(v1p1beta1_library / 'test/google/cloud/speech/v1p1beta1')

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-speech.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# PERMANENT: Install partial gapics
s.replace(
    'lib/google/cloud/speech/v1.rb',
    'require "google/cloud/speech/v1/speech_client"',
    'require "google/cloud/speech/v1/speech_client"\nrequire "google/cloud/speech/v1/helpers"')
s.replace(
    'lib/google/cloud/speech/v1p1beta1.rb',
Example #10
0
s.copy(v1beta2 / 'lib/google/cloud/dataproc/v1beta2')
s.copy(v1beta2 / 'lib/google/cloud/dataproc/v1beta2.rb')
s.copy(v1beta2 / 'acceptance/google/cloud/dataproc/v1beta2')
s.copy(v1beta2 / 'test/google/cloud/dataproc/v1beta2')

# Use v1beta2 version of dataproc.rb because it includes services not found in
# v1. Need to change the default version back to v1.
s.copy(v1beta2 / 'lib/google/cloud/dataproc.rb')
s.replace('lib/google/cloud/dataproc.rb', ':v1beta2', ':v1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-dataproc.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Update Authentication Guide for multi-service clients
s.replace('AUTHENTICATION.md', 'Google::Cloud::Dataproc.new',
          'Google::Cloud::Dataproc::AutoscalingPolicyService.new')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/dataproc.rb', 'lib/google/cloud/dataproc/v*.rb',
        'lib/google/cloud/dataproc/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
Example #11
0
    config_path='artman_cloudscheduler_v1.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-cloudscheduler',
)

s.copy(v1_library / 'lib/google/cloud/scheduler/v1')
s.copy(v1_library / 'lib/google/cloud/scheduler/v1.rb')
s.copy(v1_library / 'lib/google/cloud/scheduler.rb')
s.copy(v1_library / 'test/google/cloud/scheduler/v1')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-scheduler.gemspec', merge=ruby.merge_gemspec)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-scheduler.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/scheduler.rb', 'lib/google/cloud/scheduler/v*.rb',
        'lib/google/cloud/scheduler/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #12
0
)
s.copy(v1_library / 'acceptance')
s.copy(v1_library / 'lib')
s.copy(v1_library / 'test')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-bigquery-data_transfer.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-bigquery-data_transfer.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# Support for service_address
s.replace(
    [
        'lib/google/cloud/bigquery/data_transfer.rb',
        'lib/google/cloud/bigquery/data_transfer/v*.rb',
        'lib/google/cloud/bigquery/data_transfer/v*/*_client.rb'
    ],
Example #13
0
    artman_output_name='google-cloud-ruby/google-cloud-talent',
    config_path='artman_talent_v4beta1.yaml')
s.copy(v4beta1 / 'lib')
s.copy(v4beta1 / 'test')
s.copy(v4beta1 / 'README.md')
s.copy(v4beta1 / 'LICENSE')
s.copy(v4beta1 / '.gitignore')
s.copy(v4beta1 / '.yardopts')
s.copy(v4beta1 / 'google-cloud-talent.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-talent.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Update Authentication Guide for multi-service clients
s.replace('AUTHENTICATION.md', 'Google::Cloud::Talent.new',
          'Google::Cloud::Talent::ApplicationService.new')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/talent.rb', 'lib/google/cloud/talent/v*.rb',
        'lib/google/cloud/talent/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
Example #14
0
v1beta1_library = gapic.ruby_library(
    'texttospeech',
    'v1beta1',
    artman_output_name='google-cloud-ruby/google-cloud-texttospeech',
)
s.copy(v1beta1_library / 'lib/google/cloud/text_to_speech/v1beta1')
s.copy(v1beta1_library / 'lib/google/cloud/text_to_speech/v1beta1.rb')
s.copy(v1beta1_library / 'lib/google/cloud/texttospeech/v1beta1')
s.copy(v1beta1_library / 'test/google/cloud/text_to_speech/v1beta1')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-text_to_speech.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/text_to_speech.rb',
        'lib/google/cloud/text_to_speech/v*.rb',
        'lib/google/cloud/text_to_speech/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
Example #15
0
v1_library = gapic.ruby_library(
    'container',
    'v1',
    config_path='/google/container/artman_container_v1.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-container')
s.copy(v1_library / 'acceptance')
s.copy(v1_library / 'lib')
s.copy(v1_library / 'test')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-container.gemspec', merge=ruby.merge_gemspec)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-container.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/container.rb', 'lib/google/cloud/container/v*.rb',
        'lib/google/cloud/container/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #16
0
s.copy(v2_library / 'lib/google/cloud/tasks.rb')
s.copy(v2_library / 'lib/google/cloud/tasks/v2')
s.copy(v2_library / 'lib/google/cloud/tasks/v2.rb')
s.copy(v2_library / 'test/google/cloud/tasks/v2')
s.copy(v2_library / 'README.md')
s.copy(v2_library / 'LICENSE')
s.copy(v2_library / '.gitignore')
s.copy(v2_library / '.yardopts')
s.copy(v2_library / 'google-cloud-tasks.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-tasks.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/tasks.rb', 'lib/google/cloud/tasks/v*.rb',
        'lib/google/cloud/tasks/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #17
0
    artman_output_name='google-cloud-ruby/google-cloud-webrisk')

s.copy(v1beta1 / 'lib')
s.copy(v1beta1 / 'test')
s.copy(v1beta1 / 'README.md')
s.copy(v1beta1 / 'LICENSE')
s.copy(v1beta1 / '.gitignore')
s.copy(v1beta1 / '.yardopts')
s.copy(v1beta1 / 'google-cloud-webrisk.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-webrisk.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/webrisk.rb', 'lib/google/cloud/webrisk/v*.rb',
        'lib/google/cloud/webrisk/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #18
0
s.copy(v1beta1_library / 'lib')
s.copy(v1beta1_library / 'test')
s.copy(v1beta1_library / 'README.md')
s.copy(v1beta1_library / 'LICENSE')
s.copy(v1beta1_library / '.gitignore')
s.copy(v1beta1_library / '.yardopts')
s.copy(v1beta1_library / 'google-cloud-phishing_protection.gemspec',
       merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-phishing_protection.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/phishing_protection.rb',
        'lib/google/cloud/phishing_protection/v*.rb',
        'lib/google/cloud/phishing_protection/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
Example #19
0
    config_path='/google/privacy/dlp/artman_dlp_v2.yaml',
    artman_output_name='google-cloud-ruby/google-cloud-dlp')
s.copy(v2_library / 'lib')
s.copy(v2_library / 'test')
s.copy(v2_library / 'README.md')
s.copy(v2_library / 'LICENSE')
s.copy(v2_library / '.gitignore')
s.copy(v2_library / '.yardopts')
s.copy(v2_library / 'google-cloud-dlp.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-dlp.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/dlp.rb', 'lib/google/cloud/dlp/v*.rb',
        'lib/google/cloud/dlp/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #20
0
    artman_output_name='google-cloud-ruby/google-cloud-dialogflow')
s.copy(v2_library / 'lib')
s.copy(v2_library / 'test')
s.copy(v2_library / 'README.md')
s.copy(v2_library / 'LICENSE')
s.copy(v2_library / '.gitignore')
s.copy(v2_library / '.yardopts')
s.copy(v2_library / 'google-cloud-dialogflow.gemspec',
       merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-dialogflow.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Update Authentication Guide for multi-service clients
s.replace('AUTHENTICATION.md', 'Google::Cloud::Dialogflow.new',
          'Google::Cloud::Dialogflow::Agents.new')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/dialogflow.rb', 'lib/google/cloud/dialogflow/v*.rb',
        'lib/google/cloud/dialogflow/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
Example #21
0
s.copy(v1_library / 'lib')
s.copy(v1_library / 'test')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'grafeas.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

s.replace('grafeas.gemspec', 'Container Analysis API', 'the Grafeas API')

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('grafeas.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Hack AUTHENTICATION.md to fix nonstandard name.
s.replace('AUTHENTICATION.md', 'Google::Cloud::Grafeas', 'Grafeas')

# Hack grpc service class name
s.replace('lib/grafeas/v1/grafeas_services_pb.rb', '    module Grafeas\n',
          '    module GrafeasService\n')
s.replace([
    'lib/grafeas/v1/grafeas_client.rb',
    'test/grafeas/v1/grafeas_client_test.rb'
], 'V1::Grafeas::', 'V1::GrafeasService::')
Example #22
0
s.copy(v1beta1_library / 'lib')
s.copy(v1beta1_library / 'test')
s.copy(v1beta1_library / 'LICENSE')
s.copy(v1beta1_library / 'README.md')
s.copy(v1beta1_library / '.gitignore')
s.copy(v1beta1_library / '.yardopts')
s.copy(v1beta1_library / 'google-cloud-automl.gemspec',
       merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-automl.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Update file paths in generated files
s.replace([
    'README.md', 'google-cloud-automl.gemspec', 'test/**/*.rb', 'lib/**/*.rb'
], 'auto_m_l', 'automl')
s.replace(['test/**/*.rb', 'lib/**/*.rb'], 'auto_ml', 'automl')
s.replace(['test/**/*.rb', 'lib/**/*.rb', 'lib/**/*.json'], 'AutoMl', 'AutoML')
s.replace([
    'google-cloud-automl.gemspec', 'AUTHENTICATION.md', 'test/**/*.rb',
    'lib/**/*.rb'
], 'Automl', 'AutoML')
s.replace('lib/**/*.*', 'google.cloud.automl.v1beta1.AutoML',
Example #23
0
v1beta2_library = gapic.ruby_library(
    'language',
    'v1beta2',
    artman_output_name='google-cloud-ruby/google-cloud-language')
s.copy(v1beta2_library / 'lib/google/cloud/language/v1beta2')
s.copy(v1beta2_library / 'lib/google/cloud/language/v1beta2.rb')
s.copy(v1beta2_library / 'lib/google/cloud/language/v1beta2')
s.copy(v1beta2_library / 'test/google/cloud/language/v1beta2')

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-language.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/language.rb', 'lib/google/cloud/language/v*.rb',
        'lib/google/cloud/language/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #24
0
s.copy(v1_library / 'lib/google/cloud/security_center/v1.rb')
s.copy(v1_library / 'lib/google/cloud/security_center.rb')
s.copy(v1_library / 'test/google/cloud/security_center/v1')
s.copy(v1_library / 'README.md')
s.copy(v1_library / 'LICENSE')
s.copy(v1_library / '.gitignore')
s.copy(v1_library / '.yardopts')
s.copy(v1_library / 'google-cloud-security_center.gemspec',
       merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-security_center.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Permanent: rename securitycenter file paths to security_center
s.replace(['lib/google/cloud/security_center/**/*.rb', 'test/**/*.rb'],
          'google/cloud/securitycenter/v1', 'google/cloud/security_center/v1')
s.replace(['lib/google/cloud/security_center/**/*.rb', 'test/**/*.rb'],
          'Google::Cloud::Securitycenter', 'Google::Cloud::SecurityCenter')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/security_center.rb',
        'lib/google/cloud/security_center/v*.rb',
Example #25
0
    config_path='artman_recaptchaenterprise_v1beta1.yaml'
)
s.copy(v1beta1_library / 'lib')
s.copy(v1beta1_library / 'test')
s.copy(v1beta1_library / 'README.md')
s.copy(v1beta1_library / 'LICENSE')
s.copy(v1beta1_library / '.gitignore')
s.copy(v1beta1_library / '.yardopts')
s.copy(v1beta1_library / 'google-cloud-recaptcha_enterprise.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-recaptcha_enterprise.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
    'README.md',
    'Ruby 2.3',
    'Ruby 2.4'
)

# Support for service_address
s.replace(
    [
        'lib/google/cloud/recaptcha_enterprise.rb',
        'lib/google/cloud/recaptcha_enterprise/v*.rb',
        'lib/google/cloud/recaptcha_enterprise/v*/*_client.rb'
    ],
Example #26
0
s.copy(v1_library / 'google-cloud-redis.gemspec', merge=ruby.merge_gemspec)

# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

v1beta1_library = gapic.ruby_library(
    'redis',
    'v1beta1',
    artman_output_name='google-cloud-ruby/google-cloud-redis')
s.copy(v1beta1_library / 'lib/google/cloud/redis/v1beta1')
s.copy(v1beta1_library / 'lib/google/cloud/redis/v1beta1.rb')
s.copy(v1beta1_library / 'test/google/cloud/redis/v1beta1')

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-redis.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Support for service_address
s.replace(
    [
        'lib/google/cloud/redis.rb', 'lib/google/cloud/redis/v*.rb',
        'lib/google/cloud/redis/v*/*_client.rb'
    ], '\n(\\s+)#(\\s+)@param exception_transformer',
    '\n\\1#\\2@param service_address [String]\n' +
    '\\1#\\2  Override for the service hostname, or `nil` to leave as the default.\n'
    + '\\1#\\2@param service_port [Integer]\n' +
    '\\1#\\2  Override for the service port, or `nil` to leave as the default.\n'
    + '\\1#\\2@param exception_transformer')
Example #27
0
# Copy common templates
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Hack gemspec to fix nonstandard name.
os.rename('grafeas.gemspec', 'grafeas-client.gemspec')
s.replace('grafeas-client.gemspec', '"grafeas"', '"grafeas-client"')
s.replace('grafeas-client.gemspec', '"grafeas is the official library',
          '"grafeas-client is the official library')
s.replace('grafeas-client.gemspec', 'Container Analysis API',
          'the Grafeas API')
s.replace(['README.md', 'lib/grafeas.rb', 'lib/grafeas/v1.rb'],
          'gem install grafeas\n', 'gem install grafeas-client\n')

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('grafeas-client.gemspec')

# Update README to reflect Ruby 2.4
s.replace('README.md', 'Ruby 2.3', 'Ruby 2.4')

# Hack AUTHENTICATION.md to fix nonstandard name.
s.replace('AUTHENTICATION.md', 'require "grafeas/client"', 'require "grafeas"')
s.replace('AUTHENTICATION.md', 'Google::Cloud::Grafeas', 'Grafeas')

# Hack grpc service class name
s.replace('lib/grafeas/v1/grafeas_services_pb.rb', '    module Grafeas\n',
          '    module GrafeasService\n')
s.replace([
    'lib/grafeas/v1/grafeas_client.rb',
    'test/grafeas/v1/grafeas_client_test.rb'
], 'V1::Grafeas::', 'V1::GrafeasService::')