Skip to content

Commit

Permalink
changes to writeme config
Browse files Browse the repository at this point in the history
  • Loading branch information
ford-at-aws committed Jul 2, 2024
1 parent 3322586 commit 2672ad0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .tools/readmes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"acm": "dotnetv3/ACM",
"aurora": "dotnetv3/Aurora",
"auto-scaling": "dotnetv3/AutoScaling",
"cloudformation": "dotnetv3/CloudFormation",
"cloudwatch": "dotnetv3/CloudWatch",
"cloudwatch-logs": "dotnetv3/CloudWatchLogs",
"cognito-identity-provider": "dotnetv3/Cognito",
Expand All @@ -101,6 +102,7 @@
"sagemaker": "dotnetv3/SageMaker",
"secrets-manager": "dotnetv3/SecretsManager",
"ses": "dotnetv3/SES",
"sesv2": "dotnetv3/SESv2",
"sns": "dotnetv3/SNS",
"sqs": "dotnetv3/SQS",
"sfn": "dotnetv3/StepFunctions",
Expand Down Expand Up @@ -137,6 +139,9 @@
"base_folder": "ruby",
"service_folder": 'ruby/example_code/{{service["name"]}}',
"sdk_api_ref": 'https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/{{service["name"] | capitalize}}.html',
"service_folder_overrides": {
"cognito-identity-provider": "ruby/example_code/cognito",
},
}
},
"Rust": {
Expand Down Expand Up @@ -175,4 +180,4 @@
"sdk_api_ref": 'https://awscli.amazonaws.com/v2/documentation/api/latest/reference/{{service["name"]}}/index.html',
}
},
}
}
7 changes: 6 additions & 1 deletion .tools/readmes/includes/run_instructions.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,19 @@ go run ./hello
{% endif %}
{% if lang_config['name'] == 'Python' and lang_config['sdk_ver'] == 3 %}
```
python hello.py
python {{ hello_ex['run_file'] }}
```
{% endif %}
{% if lang_config['name'] == 'JavaScript' and lang_config['sdk_ver'] == 3 %}
```bash
node ./hello.js
```
{% endif %}
{% if lang_config['name'] == 'Ruby' and lang_config['sdk_ver'] == 3 %}
```
ruby {{ hello_ex['run_file'] }}
```
{% endif %}
{% endfor %}

{% if lang_config['name'] == 'Go' and lang_config['sdk_ver'] == 2 %}
Expand Down
3 changes: 3 additions & 0 deletions .tools/readmes/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ def _transform_hello(self, pre_hello):
"file": self.scanner.snippet(
pre, self.sdk_ver, self.lang_config["service_folder"], api
),
"run_file": self.scanner.snippet(
pre, self.sdk_ver, self.lang_config["service_folder"], ''
),
"api": api,
}
post_hello.append(action)
Expand Down

0 comments on commit 2672ad0

Please sign in to comment.