Skip to content

Commit 6482b9f

Browse files
authored
Merge pull request #30 from CyberSource/clean-up
Clean up of batch commands
2 parents f976656 + b2c8865 commit 6482b9f

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

generator/cybersource_ruby_sdk_gen.bat

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,9 @@ java -jar swagger-codegen-cli-2.2.3.jar generate -t cybersource-ruby-template -i
1616
REM to rename error__links to error_links
1717
powershell -Command "(Get-Content ..\lib\cybersource_rest_client.rb) | ForEach-Object { $_ -replace 'cybersource_rest_client/models/error__links', 'cybersource_rest_client/models/error_links' } | Set-Content ..\lib\cybersource_rest_client.rb"
1818

19-
REM accept type header modifications
20-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\capture_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\capture_api.rb"
21-
22-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\credit_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\credit_api.rb"
23-
24-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\payments_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\payments_api.rb"
25-
26-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\payouts_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\payouts_api.rb"
27-
28-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\refund_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\refund_api.rb"
29-
30-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\reversal_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\reversal_api.rb"
31-
32-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\transaction_details_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\transaction_details_api.rb"
33-
34-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\user_management_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\user_management_api.rb"
35-
36-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\void_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json', 'select_header_accept([''application/hal+json' } | Set-Content ..\lib\cybersource_rest_client\api\void_api.rb"
37-
19+
REM accept type header modifications
3820
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\search_transactions_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json;charset=utf-8', 'select_header_accept([''*/*'} | Set-Content ..\lib\cybersource_rest_client\api\search_transactions_api.rb"
3921

40-
REM powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\payer_authentication_api.rb) | ForEach-Object { $_ -replace 'select_header_accept\(\[''application/json;charset=utf-8', 'select_header_accept([''application/hal+json;charset=utf-8'} | Set-Content ..\lib\cybersource_rest_client\api\payer_authentication_api.rb"
41-
42-
REM to change accept type header
43-
powershell -Command "(Get-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb) | ForEach-Object { $_ -replace 'select_header_content_type\(\[''application/json;charset=utf-8', 'select_header_content_type([''*/*' } | Set-Content ..\lib\cybersource_rest_client\api\secure_file_share_api.rb"
44-
4522
REM to rename long file name
4623

4724
powershell -Command " rename-item -Path ..\lib\cybersource_rest_client\models\ptsv2payments_processing_information_authorization_options_initiator_merchant_initiated_transaction.rb -newname ptsv2payments_merchant_initiated_transaction.rb"
@@ -111,7 +88,7 @@ for /f "tokens=1* delims=\" %%A in (
11188
)
11289
)
11390

114-
powershell -Command "(get-content ..\lib\cybersource_rest_client.rb) | ForEach-Object { $_ -replace 'require ''cybersource_rest_client/api/download_dtd_api''', '' } | ForEach-Object { $_ -replace 'require ''cybersource_rest_client/api/download_xsd_api''', '' } | Set-Content ..\lib\cybersource_rest_client.rb"
91+
REM powershell -Command "(get-content ..\lib\cybersource_rest_client.rb) | ForEach-Object { $_ -replace 'require ''cybersource_rest_client/api/download_dtd_api''', '' } | ForEach-Object { $_ -replace 'require ''cybersource_rest_client/api/download_xsd_api''', '' } | Set-Content ..\lib\cybersource_rest_client.rb"
11592

11693
REM to remove beginning / from loc_var_path in all the api files
11794
cd ..\lib\cybersource_rest_client\api

0 commit comments

Comments
 (0)