wsc_sdk 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +146 -0
- data/.circleci/docker/build/Dockerfile +3 -0
- data/.circleci/helpers/add_preamble.rb +29 -0
- data/.circleci/helpers/build_docs.sh +5 -0
- data/.circleci/helpers/build_gem.sh +5 -0
- data/.circleci/helpers/debundle-context.sh +14 -0
- data/.circleci/helpers/finalize_release.sh +24 -0
- data/.circleci/helpers/publish_docs.sh +10 -0
- data/.circleci/helpers/release_gem.sh +8 -0
- data/.circleci/helpers/setup.sh +11 -0
- data/.circleci/helpers/setup_aws.sh +13 -0
- data/.circleci/helpers/setup_gem.sh +2 -0
- data/.circleci/helpers/setup_git.sh +27 -0
- data/.circleci/helpers/setup_rubygems.sh +15 -0
- data/.circleci/helpers/test_integration.sh +12 -0
- data/.circleci/helpers/test_unit.sh +6 -0
- data/.circleci/jobs/publish-production.sh +17 -0
- data/.circleci/jobs/publish-staging.sh +17 -0
- data/.circleci/jobs/release-production.sh +21 -0
- data/.circleci/jobs/test-integration.sh +9 -0
- data/.circleci/jobs/test-unit.sh +9 -0
- data/.circleci/tag_repo.rb +46 -0
- data/.gitignore +28 -0
- data/.rspec +2 -0
- data/.yard/config +2 -0
- data/.yard/template/default/fulldoc/html/css/custom.css +151 -0
- data/.yard/template/default/layout/html/footer.erb +0 -0
- data/.yard/template/default/layout/html/headers.erb +10 -0
- data/.yard/template/default/layout/html/layout.erb +45 -0
- data/.yard/template/default/layout/html/setup.rb +24 -0
- data/.yardopts +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +99 -0
- data/LICENSE.txt +28 -0
- data/README.md +397 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/doc/Hash.html +291 -0
- data/doc/WscSdk.html +570 -0
- data/doc/WscSdk/ApiResponse.html +242 -0
- data/doc/WscSdk/Attributes.html +128 -0
- data/doc/WscSdk/Attributes/Mode.html +191 -0
- data/doc/WscSdk/Attributes/Type.html +389 -0
- data/doc/WscSdk/Client.html +2677 -0
- data/doc/WscSdk/Configuration.html +595 -0
- data/doc/WscSdk/Endpoint.html +2974 -0
- data/doc/WscSdk/Endpoints.html +141 -0
- data/doc/WscSdk/Endpoints/CustomStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/LiveStreams.html +197 -0
- data/doc/WscSdk/Endpoints/OutputStreamTargets.html +180 -0
- data/doc/WscSdk/Endpoints/Outputs.html +180 -0
- data/doc/WscSdk/Endpoints/StreamTargets.html +446 -0
- data/doc/WscSdk/Endpoints/Transcoders.html +197 -0
- data/doc/WscSdk/Endpoints/UllStreamTargets.html +383 -0
- data/doc/WscSdk/Endpoints/WowzaStreamTargets.html +383 -0
- data/doc/WscSdk/Enum.html +225 -0
- data/doc/WscSdk/Enums.html +321 -0
- data/doc/WscSdk/Enums/BillingMode.html +188 -0
- data/doc/WscSdk/Enums/BroadcastLocation.html +396 -0
- data/doc/WscSdk/Enums/BufferSize.html +301 -0
- data/doc/WscSdk/Enums/ClosedCaptionType.html +221 -0
- data/doc/WscSdk/Enums/CustomProvider.html +252 -0
- data/doc/WscSdk/Enums/DeliveryMethod.html +188 -0
- data/doc/WscSdk/Enums/DeliveryType.html +188 -0
- data/doc/WscSdk/Enums/Encoder.html +460 -0
- data/doc/WscSdk/Enums/Errors.html +555 -0
- data/doc/WscSdk/Enums/IdleTimeout.html +398 -0
- data/doc/WscSdk/Enums/ImagePosition.html +220 -0
- data/doc/WscSdk/Enums/ModelMode.html +175 -0
- data/doc/WscSdk/Enums/ModelType.html +373 -0
- data/doc/WscSdk/Enums/PlayerType.html +188 -0
- data/doc/WscSdk/Enums/Protocol.html +204 -0
- data/doc/WscSdk/Enums/TargetDeliveryProtocol.html +188 -0
- data/doc/WscSdk/Enums/TranscoderType.html +188 -0
- data/doc/WscSdk/Enums/UserRegion.html +383 -0
- data/doc/WscSdk/Enums/WowzaProvider.html +188 -0
- data/doc/WscSdk/Errors.html +683 -0
- data/doc/WscSdk/Loggable.html +346 -0
- data/doc/WscSdk/Model.html +3316 -0
- data/doc/WscSdk/ModelList.html +442 -0
- data/doc/WscSdk/ModelTemplate.html +267 -0
- data/doc/WscSdk/Models.html +141 -0
- data/doc/WscSdk/Models/CustomStreamTarget.html +192 -0
- data/doc/WscSdk/Models/Error.html +351 -0
- data/doc/WscSdk/Models/LiveStream.html +601 -0
- data/doc/WscSdk/Models/LiveStreamConnectionCode.html +192 -0
- data/doc/WscSdk/Models/LiveStreamState.html +200 -0
- data/doc/WscSdk/Models/LiveStreamStats.html +200 -0
- data/doc/WscSdk/Models/LiveStreamThumbnailUrl.html +200 -0
- data/doc/WscSdk/Models/Output.html +294 -0
- data/doc/WscSdk/Models/OutputStreamTarget.html +274 -0
- data/doc/WscSdk/Models/StreamTarget.html +273 -0
- data/doc/WscSdk/Models/Transcoder.html +793 -0
- data/doc/WscSdk/Models/TranscoderBooleanStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderConnectionCode.html +192 -0
- data/doc/WscSdk/Models/TranscoderFloatStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderIntegerStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderState.html +196 -0
- data/doc/WscSdk/Models/TranscoderStats.html +196 -0
- data/doc/WscSdk/Models/TranscoderStreamTargetState.html +192 -0
- data/doc/WscSdk/Models/TranscoderStringStat.html +278 -0
- data/doc/WscSdk/Models/TranscoderThumbnailUrl.html +196 -0
- data/doc/WscSdk/Models/UllStreamTarget.html +360 -0
- data/doc/WscSdk/Models/WowzaStreamTarget.html +380 -0
- data/doc/WscSdk/Pagination.html +1277 -0
- data/doc/WscSdk/Schema.html +861 -0
- data/doc/WscSdk/SchemaAttribute.html +2400 -0
- data/doc/WscSdk/Templates.html +141 -0
- data/doc/WscSdk/Templates/CustomStreamTarget.html +1045 -0
- data/doc/WscSdk/Templates/LiveStream.html +1432 -0
- data/doc/WscSdk/Templates/Output.html +829 -0
- data/doc/WscSdk/Templates/Transcoder.html +699 -0
- data/doc/WscSdk/Templates/UllStreamTarget.html +411 -0
- data/doc/WscSdk/Templates/WowzaStreamTarget.html +447 -0
- data/doc/WscSdk/TranscoderSharedMethods.html +1113 -0
- data/doc/_index.html +705 -0
- data/doc/class_list.html +51 -0
- data/doc/css/bootstrap.css +5 -0
- data/doc/css/common.css +1 -0
- data/doc/css/custom.css +151 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.README.html +570 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/images/wsc-ruby-1800x400.png +0 -0
- data/doc/index.html +570 -0
- data/doc/js/app.js +292 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +1731 -0
- data/doc/top-level-namespace.html +182 -0
- data/examples/client.rb +40 -0
- data/examples/helpers.rb +100 -0
- data/examples/live_streams/create.rb +39 -0
- data/examples/live_streams/delete.rb +32 -0
- data/examples/live_streams/find.rb +22 -0
- data/examples/live_streams/flood.rb +126 -0
- data/examples/live_streams/list.rb +24 -0
- data/examples/live_streams/regenerate_connection_code.rb +29 -0
- data/examples/live_streams/reset.rb +32 -0
- data/examples/live_streams/reset_and_wait.rb +51 -0
- data/examples/live_streams/start.rb +33 -0
- data/examples/live_streams/start_and_wait.rb +51 -0
- data/examples/live_streams/state.rb +33 -0
- data/examples/live_streams/stats.rb +43 -0
- data/examples/live_streams/stop.rb +33 -0
- data/examples/live_streams/stop_and_wait.rb +51 -0
- data/examples/live_streams/thumbnail_url.rb +46 -0
- data/examples/live_streams/update.rb +43 -0
- data/examples/live_streams/workflow.rb +165 -0
- data/examples/output_stream_targets/create.rb +56 -0
- data/examples/output_stream_targets/delete.rb +45 -0
- data/examples/output_stream_targets/find.rb +37 -0
- data/examples/output_stream_targets/list.rb +36 -0
- data/examples/output_stream_targets/update.rb +56 -0
- data/examples/outputs/create.rb +49 -0
- data/examples/outputs/delete.rb +39 -0
- data/examples/outputs/find.rb +31 -0
- data/examples/outputs/list.rb +29 -0
- data/examples/outputs/update.rb +50 -0
- data/examples/stream_targets/custom/create.rb +42 -0
- data/examples/stream_targets/custom/delete.rb +31 -0
- data/examples/stream_targets/custom/find.rb +23 -0
- data/examples/stream_targets/custom/list.rb +24 -0
- data/examples/stream_targets/custom/update.rb +43 -0
- data/examples/stream_targets/list.rb +24 -0
- data/examples/stream_targets/ull/create.rb +41 -0
- data/examples/stream_targets/ull/delete.rb +31 -0
- data/examples/stream_targets/ull/find.rb +23 -0
- data/examples/stream_targets/ull/list.rb +24 -0
- data/examples/stream_targets/ull/update.rb +43 -0
- data/examples/stream_targets/wowza/create.rb +42 -0
- data/examples/stream_targets/wowza/delete.rb +31 -0
- data/examples/stream_targets/wowza/find.rb +23 -0
- data/examples/stream_targets/wowza/list.rb +23 -0
- data/examples/stream_targets/wowza/update.rb +43 -0
- data/examples/transcoders/create.rb +39 -0
- data/examples/transcoders/delete.rb +31 -0
- data/examples/transcoders/find.rb +23 -0
- data/examples/transcoders/list.rb +24 -0
- data/examples/transcoders/reset.rb +32 -0
- data/examples/transcoders/reset_and_wait.rb +48 -0
- data/examples/transcoders/start.rb +33 -0
- data/examples/transcoders/start_and_wait.rb +50 -0
- data/examples/transcoders/state.rb +33 -0
- data/examples/transcoders/stats.rb +43 -0
- data/examples/transcoders/stop.rb +33 -0
- data/examples/transcoders/stop_and_wait.rb +50 -0
- data/examples/transcoders/thumbnail_url.rb +46 -0
- data/examples/transcoders/update.rb +43 -0
- data/images/wsc-ruby-1800x400.png +0 -0
- data/lib/wsc_sdk.rb +81 -0
- data/lib/wsc_sdk/client.rb +417 -0
- data/lib/wsc_sdk/configuration.rb +21 -0
- data/lib/wsc_sdk/constants.rb +29 -0
- data/lib/wsc_sdk/endpoint.rb +492 -0
- data/lib/wsc_sdk/endpoints/custom_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/live_streams.rb +34 -0
- data/lib/wsc_sdk/endpoints/output_stream_targets.rb +17 -0
- data/lib/wsc_sdk/endpoints/outputs.rb +17 -0
- data/lib/wsc_sdk/endpoints/stream_targets.rb +45 -0
- data/lib/wsc_sdk/endpoints/transcoders.rb +38 -0
- data/lib/wsc_sdk/endpoints/ull_stream_targets.rb +44 -0
- data/lib/wsc_sdk/endpoints/wowza_stream_targets.rb +44 -0
- data/lib/wsc_sdk/enums.rb +31 -0
- data/lib/wsc_sdk/enums/billing_mode.rb +20 -0
- data/lib/wsc_sdk/enums/broadcast_location.rb +58 -0
- data/lib/wsc_sdk/enums/buffer_size.rb +41 -0
- data/lib/wsc_sdk/enums/closed_caption_type.rb +26 -0
- data/lib/wsc_sdk/enums/custom_provider.rb +32 -0
- data/lib/wsc_sdk/enums/delivery_method.rb +20 -0
- data/lib/wsc_sdk/enums/delivery_type.rb +20 -0
- data/lib/wsc_sdk/enums/encoder.rb +71 -0
- data/lib/wsc_sdk/enums/idle_timeout.rb +50 -0
- data/lib/wsc_sdk/enums/image_position.rb +26 -0
- data/lib/wsc_sdk/enums/player_type.rb +20 -0
- data/lib/wsc_sdk/enums/protocol.rb +23 -0
- data/lib/wsc_sdk/enums/target_delivery_protocol.rb +20 -0
- data/lib/wsc_sdk/enums/transcoder_type.rb +20 -0
- data/lib/wsc_sdk/enums/wowza_provider.rb +20 -0
- data/lib/wsc_sdk/errors.rb +115 -0
- data/lib/wsc_sdk/model.rb +515 -0
- data/lib/wsc_sdk/model_list.rb +42 -0
- data/lib/wsc_sdk/model_template.rb +27 -0
- data/lib/wsc_sdk/models/custom_stream_target.rb +34 -0
- data/lib/wsc_sdk/models/error.rb +53 -0
- data/lib/wsc_sdk/models/live_stream.rb +130 -0
- data/lib/wsc_sdk/models/live_stream_connection_code.rb +31 -0
- data/lib/wsc_sdk/models/live_stream_state.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_stats.rb +20 -0
- data/lib/wsc_sdk/models/live_stream_thumbnail_url.rb +20 -0
- data/lib/wsc_sdk/models/output.rb +61 -0
- data/lib/wsc_sdk/models/output_stream_target.rb +37 -0
- data/lib/wsc_sdk/models/stream_target.rb +29 -0
- data/lib/wsc_sdk/models/transcoder.rb +135 -0
- data/lib/wsc_sdk/models/transcoder_boolean_stat.rb +41 -0
- data/lib/wsc_sdk/models/transcoder_connection_code.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_float_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_integer_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_state.rb +31 -0
- data/lib/wsc_sdk/models/transcoder_stats.rb +51 -0
- data/lib/wsc_sdk/models/transcoder_stream_target_state.rb +29 -0
- data/lib/wsc_sdk/models/transcoder_string_stat.rb +40 -0
- data/lib/wsc_sdk/models/transcoder_thumbnail_url.rb +29 -0
- data/lib/wsc_sdk/models/ull_stream_target.rb +54 -0
- data/lib/wsc_sdk/models/wowza_stream_target.rb +60 -0
- data/lib/wsc_sdk/modules/api_response.rb +24 -0
- data/lib/wsc_sdk/modules/loggable.rb +44 -0
- data/lib/wsc_sdk/modules/transcoder_shared_methods.rb +221 -0
- data/lib/wsc_sdk/pagination.rb +89 -0
- data/lib/wsc_sdk/schema.rb +140 -0
- data/lib/wsc_sdk/schema_attribute.rb +349 -0
- data/lib/wsc_sdk/templates/custom_stream_target.rb +154 -0
- data/lib/wsc_sdk/templates/live_stream.rb +234 -0
- data/lib/wsc_sdk/templates/output.rb +133 -0
- data/lib/wsc_sdk/templates/transcoder.rb +97 -0
- data/lib/wsc_sdk/templates/ull_stream_target.rb +49 -0
- data/lib/wsc_sdk/templates/wowza_stream_target.rb +57 -0
- data/lib/wsc_sdk/version.rb +7 -0
- data/wsc_sdk.gemspec +48 -0
- metadata +460 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e5204b851dc4c976564721612587b630600a3e83
|
4
|
+
data.tar.gz: 38949dccec95bd74812f9fdb02b00b8910052099
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 71788ae4a537487b02520a50ff77495e4e669b3ed192aa0ee9754a6a65b506d0a342b7dee29c8b880f2dc13af00417b461a34a536e4025d42b5058f906a845ab
|
7
|
+
data.tar.gz: c027012171a6b2f85edb005e840c1b42e9dedd058aa54e3fcd23085bde3f519f5f00b85987af15c0ddee3c0051799b4d31ca22cc2769a4239420811167c95ec5
|
@@ -0,0 +1,146 @@
|
|
1
|
+
version: 2
|
2
|
+
|
3
|
+
# The workflows that drive this project
|
4
|
+
workflows:
|
5
|
+
version: 2
|
6
|
+
|
7
|
+
test:
|
8
|
+
jobs:
|
9
|
+
- test-unit-development:
|
10
|
+
context: wsc-sdk-ruby
|
11
|
+
filters:
|
12
|
+
branches:
|
13
|
+
ignore: /development/
|
14
|
+
|
15
|
+
- test-unit:
|
16
|
+
context: wsc-sdk-ruby
|
17
|
+
filters:
|
18
|
+
tags:
|
19
|
+
only: /run\-unit\-tests/
|
20
|
+
branches:
|
21
|
+
ignore: /.*/
|
22
|
+
|
23
|
+
- test-integration:
|
24
|
+
context: wsc-sdk-ruby
|
25
|
+
filters:
|
26
|
+
tags:
|
27
|
+
only: /run\-integration\-tests/
|
28
|
+
branches:
|
29
|
+
ignore: /.*/
|
30
|
+
|
31
|
+
release:
|
32
|
+
jobs:
|
33
|
+
- release-production:
|
34
|
+
context: wsc-sdk-ruby-publish-staging
|
35
|
+
filters:
|
36
|
+
tags:
|
37
|
+
only: /release/
|
38
|
+
branches:
|
39
|
+
ignore: /.*/
|
40
|
+
|
41
|
+
publish:
|
42
|
+
jobs:
|
43
|
+
- publish-staging:
|
44
|
+
context: wsc-sdk-ruby-publish-staging
|
45
|
+
filters:
|
46
|
+
tags:
|
47
|
+
only: /publish-staging/
|
48
|
+
branches:
|
49
|
+
ignore: /.*/
|
50
|
+
|
51
|
+
- publish-production:
|
52
|
+
context: wsc-sdk-ruby-publish-production
|
53
|
+
filters:
|
54
|
+
tags:
|
55
|
+
only: /publish-production/
|
56
|
+
branches:
|
57
|
+
ignore: /.*/
|
58
|
+
|
59
|
+
jobs:
|
60
|
+
|
61
|
+
release-production:
|
62
|
+
|
63
|
+
docker:
|
64
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
65
|
+
# auth:
|
66
|
+
# username: $DOCKER_REG_USERNAME
|
67
|
+
# password: $DOCKER_REG_PASSWORD
|
68
|
+
|
69
|
+
steps:
|
70
|
+
- checkout
|
71
|
+
- run:
|
72
|
+
name: Build and Deploy (Master)
|
73
|
+
command: ". ./.circleci/jobs/release-production.sh"
|
74
|
+
|
75
|
+
publish-staging:
|
76
|
+
docker:
|
77
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
78
|
+
# auth:
|
79
|
+
# username: $DOCKER_REG_USERNAME
|
80
|
+
# password: $DOCKER_REG_PASSWORD
|
81
|
+
|
82
|
+
steps:
|
83
|
+
- checkout
|
84
|
+
- run:
|
85
|
+
name: Publish Staging Documentation
|
86
|
+
command: ". ./.circleci/jobs/publish-staging.sh"
|
87
|
+
|
88
|
+
publish-production:
|
89
|
+
docker:
|
90
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
91
|
+
# auth:
|
92
|
+
# username: $DOCKER_REG_USERNAME
|
93
|
+
# password: $DOCKER_REG_PASSWORD
|
94
|
+
|
95
|
+
steps:
|
96
|
+
- checkout
|
97
|
+
- run:
|
98
|
+
name: Publish Production Documentation
|
99
|
+
command: ". ./.circleci/jobs/publish-production.sh"
|
100
|
+
|
101
|
+
test-unit:
|
102
|
+
|
103
|
+
docker:
|
104
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
105
|
+
# auth:
|
106
|
+
# username: $DOCKER_REG_USERNAME
|
107
|
+
# password: $DOCKER_REG_PASSWORD
|
108
|
+
|
109
|
+
steps:
|
110
|
+
- checkout
|
111
|
+
- run:
|
112
|
+
name: Run Unit Tests
|
113
|
+
command: ". ./.circleci/jobs/test-unit.sh"
|
114
|
+
- store_test_results:
|
115
|
+
path: test_results
|
116
|
+
|
117
|
+
test-unit-development:
|
118
|
+
docker:
|
119
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
120
|
+
# auth:
|
121
|
+
# username: $DOCKER_REG_USERNAME
|
122
|
+
# password: $DOCKER_REG_PASSWORD
|
123
|
+
|
124
|
+
steps:
|
125
|
+
- checkout
|
126
|
+
- run:
|
127
|
+
name: Run Unit Tests
|
128
|
+
command: ". ./.circleci/jobs/test-unit.sh"
|
129
|
+
- store_test_results:
|
130
|
+
path: test_results
|
131
|
+
|
132
|
+
test-integration:
|
133
|
+
|
134
|
+
docker:
|
135
|
+
- image: quay.io/wowzaprivate/wsc-sdk-ruby-build:0.0.0
|
136
|
+
# auth:
|
137
|
+
# username: $DOCKER_REG_USERNAME
|
138
|
+
# password: $DOCKER_REG_PASSWORD
|
139
|
+
|
140
|
+
steps:
|
141
|
+
- checkout
|
142
|
+
- run:
|
143
|
+
name: Run Integration Tests
|
144
|
+
command: ". ./.circleci/jobs/test-integration.sh"
|
145
|
+
- store_test_results:
|
146
|
+
path: test_results
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
WORK_DIR = File.absolute_path(File.join(__dir__, "..", ".."))
|
4
|
+
|
5
|
+
ruby_files = Dir[File.join(WORK_DIR, "**/*.rb")]
|
6
|
+
|
7
|
+
ruby_files.each do |ruby_file|
|
8
|
+
file_contents = File.read(ruby_file)
|
9
|
+
|
10
|
+
next if file_contents.nil?
|
11
|
+
|
12
|
+
# Strip out existing preambles leading/trailing white space.
|
13
|
+
file_contents = file_contents.gsub(/^\#\#\#\#\>.*$/, "").strip
|
14
|
+
|
15
|
+
# Extract the lines of the file
|
16
|
+
lines = file_contents.split("\n")
|
17
|
+
|
18
|
+
preamble = [
|
19
|
+
"####> This code and all components © 2015 – #{Time.new.year} Wowza Media Systems, LLC. All rights reserved.",
|
20
|
+
"####> This code is licensed pursuant to the BSD 3-Clause License.",
|
21
|
+
""
|
22
|
+
]
|
23
|
+
|
24
|
+
lines = preamble + lines
|
25
|
+
|
26
|
+
puts "-"*80
|
27
|
+
puts "File: #{ruby_file}"
|
28
|
+
File.open(ruby_file, 'w') { |f| f.puts lines.join("\n") }
|
29
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# The context environment variable that contains the bundle
|
4
|
+
# WOWZA_CONTEXT_BUNDLE
|
5
|
+
|
6
|
+
echo "Debundling the WOWZA_CONTEXT_BUNDLE environment variable"
|
7
|
+
|
8
|
+
wcb_dir=~/.wowza-context-bundle
|
9
|
+
|
10
|
+
mkdir -p ${wcb_dir}
|
11
|
+
|
12
|
+
echo $WOWZA_CONTEXT_BUNDLE | base64 --decode | sed -e 's/^/export /' > ${wcb_dir}/exports.sh
|
13
|
+
|
14
|
+
. ${wcb_dir}/exports.sh
|
@@ -0,0 +1,24 @@
|
|
1
|
+
echo
|
2
|
+
echo "---===[ finalize_release.sh ]===---"
|
3
|
+
echo
|
4
|
+
|
5
|
+
# Generate the version tag.
|
6
|
+
VERSION_TAG=`bundle exec ruby -e 'require "wsc_sdk"' -e 'puts WscSdk::VERSION'`
|
7
|
+
|
8
|
+
git config --global push.default current
|
9
|
+
|
10
|
+
# Commit/push updated files
|
11
|
+
git add .
|
12
|
+
git commit -m "SDK release version ${VERSION_TAG} [ci skip]"
|
13
|
+
git push origin
|
14
|
+
|
15
|
+
# Tag the commit and update the REPO.
|
16
|
+
git push origin ":${VERSION_TAG}"
|
17
|
+
git tag --delete ${VERSION_TAG}
|
18
|
+
git tag -a v${VERSION_TAG} -m "Released version: ${VERSION_TAG}"
|
19
|
+
git push --tags > /dev/null 2>&1
|
20
|
+
|
21
|
+
# git push origin :refs/tags/v${VERSION_TAG}
|
22
|
+
# git tag -fa v${VERSION_TAG}
|
23
|
+
# git push origin --tags
|
24
|
+
# git push origin
|
@@ -0,0 +1,10 @@
|
|
1
|
+
echo
|
2
|
+
echo "---===[ publish_docs.sh ]===---"
|
3
|
+
echo
|
4
|
+
|
5
|
+
: "${WSC_DOCS_BUCKET:?Need to set WSC_DOCS_BUCKET}"
|
6
|
+
|
7
|
+
echo "Copying doc/ directory to ${WSC_DOCS_BUCKET} bucket"
|
8
|
+
|
9
|
+
# Copy the generated docs to the server.
|
10
|
+
aws s3 cp doc/ s3://${WSC_DOCS_BUCKET}/resources/wsc/sdk/ruby --recursive --acl public-read
|
@@ -0,0 +1,13 @@
|
|
1
|
+
aws_dir=~/.aws
|
2
|
+
|
3
|
+
echo "Reading the AWS configuration from the environment variables so we can"
|
4
|
+
echo "build the ${aws_dir}/credentials file."
|
5
|
+
: "${AWS_ACCESS_KEY_ID:?Need to set AWS_ACCESS_KEY_ID}"
|
6
|
+
: "${AWS_SECRET_ACCESS_KEY:?Need to set AWS_SECRET_ACCESS_KEY}"
|
7
|
+
|
8
|
+
# Build the AWS credentials
|
9
|
+
mkdir -p ${aws_dir}
|
10
|
+
echo "[default]" > ${aws_dir}/credentials
|
11
|
+
echo "aws_access_key_id = $AWS_ACCESS_KEY_ID" >> ${aws_dir}/credentials
|
12
|
+
echo "aws_secret_access_key = $AWS_SECRET_ACCESS_KEY" >> ${aws_dir}/credentials
|
13
|
+
chmod 0600 ${aws_dir}/credentials
|
@@ -0,0 +1,27 @@
|
|
1
|
+
ssh_dir=~/.ssh
|
2
|
+
|
3
|
+
echo "Reading the base64 encoded git_ssh_key passed in as environment variable"
|
4
|
+
echo "and putting it in the ${ssh_dir}/id_rsa file"
|
5
|
+
: "${GIT_SSH_KEY_BASE64:?Need to set GIT_SSH_KEY_BASE64}"
|
6
|
+
|
7
|
+
mkdir -p ${ssh_dir}
|
8
|
+
|
9
|
+
sudo touch ${ssh_dir}/known_hosts
|
10
|
+
sudo chmod 777 ${ssh_dir}/known_hosts
|
11
|
+
sudo ssh-keyscan github.com >> ${ssh_dir}/known_hosts
|
12
|
+
sudo ssh-keyscan wowza.git.beanstalkapp.com >> ${ssh_dir}/known_hosts
|
13
|
+
sudo ssh-keyscan wowzamedia.git.beanstalkapp.com >> ${ssh_dir}/known_hosts
|
14
|
+
sudo chmod 644 ${ssh_dir}/known_hosts
|
15
|
+
|
16
|
+
export GIT_SSH_KEY_FILE=${ssh_dir}/id_rsa
|
17
|
+
echo $GIT_SSH_KEY_BASE64 | base64 -d > $GIT_SSH_KEY_FILE
|
18
|
+
chmod 600 $GIT_SSH_KEY_FILE
|
19
|
+
|
20
|
+
# Remove the default keyfile from teh agent (the read only one that circle uses)
|
21
|
+
ssh-add -D
|
22
|
+
# Add our more powerful key
|
23
|
+
ssh-add ${GIT_SSH_KEY_FILE}
|
24
|
+
|
25
|
+
# Setup the git configuration
|
26
|
+
git config --global user.email "circleci@wowza.com"
|
27
|
+
git config --global user.name "CirlceCI"
|
@@ -0,0 +1,15 @@
|
|
1
|
+
rubygems_dir=~/.gem
|
2
|
+
|
3
|
+
echo "Reading the RubyGems API key passed in from the environment variables so"
|
4
|
+
echo "we can build the ${rubygems_dir}/credentials file."
|
5
|
+
: "${RUBYGEMS_API_KEY:?Need to set RUBYGEMS_API_KEY}"
|
6
|
+
|
7
|
+
# Build the gems credentials for rubygems.org
|
8
|
+
mkdir -p ${rubygems_dir}
|
9
|
+
echo "---" > ${rubygems_dir}/credentials
|
10
|
+
echo ":rubygems_api_key: ${RUBYGEMS_API_KEY}" >> ${rubygems_dir}/credentials
|
11
|
+
chmod 0600 ${rubygems_dir}/credentials
|
12
|
+
|
13
|
+
echo
|
14
|
+
cat ${rubygems_dir}/credentials
|
15
|
+
echo
|
@@ -0,0 +1,12 @@
|
|
1
|
+
echo
|
2
|
+
echo "---===[ test_integration.sh ]===---"
|
3
|
+
echo
|
4
|
+
|
5
|
+
echo "Reading the API configuration from the environment variables so we can"
|
6
|
+
echo "run the integration tests."
|
7
|
+
: "${WSC_API_KEY:?Need to set WSC_API_KEY}"
|
8
|
+
: "${WSC_API_ACCESS_KEY:?Need to set WSC_API_ACCESS_KEY}"
|
9
|
+
: "${WSC_API_TEST_HOSTNAME:?Need to set WSC_API_TEST_HOSTNAME}"
|
10
|
+
|
11
|
+
|
12
|
+
# bundle exec rspec ./spec/integration --tag integration_test --format documentation --format RspecJunitFormatter --out ./test_results/rspec_integration/results.xml
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
echo "-----=====[ publish-staging.sh ]======-----"
|
3
|
+
echo
|
4
|
+
|
5
|
+
. ./.circleci/helpers/debundle-context.sh
|
6
|
+
|
7
|
+
. ./.circleci/helpers/setup.sh
|
8
|
+
|
9
|
+
. ./.circleci/helpers/test_unit.sh
|
10
|
+
|
11
|
+
. ./.circleci/helpers/test_integration.sh
|
12
|
+
|
13
|
+
. ./.circleci/helpers/build_docs.sh
|
14
|
+
|
15
|
+
. ./.circleci/helpers/publish_docs.sh
|
16
|
+
|
17
|
+
# /bin/bash ./.circleci/helpers/finalize_release.sh
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
echo "-----=====[ publish-staging.sh ]======-----"
|
3
|
+
echo
|
4
|
+
|
5
|
+
. ./.circleci/helpers/debundle-context.sh
|
6
|
+
|
7
|
+
. ./.circleci/helpers/setup.sh
|
8
|
+
|
9
|
+
. ./.circleci/helpers/test_unit.sh
|
10
|
+
|
11
|
+
. ./.circleci/helpers/test_integration.sh
|
12
|
+
|
13
|
+
. ./.circleci/helpers/build_docs.sh
|
14
|
+
|
15
|
+
. ./.circleci/helpers/publish_docs.sh
|
16
|
+
|
17
|
+
# /bin/bash ./.circleci/helpers/finalize_release.sh
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
echo "-----=====[ build-and-deploy-master.sh ]======-----"
|
3
|
+
echo
|
4
|
+
|
5
|
+
. ./.circleci/helpers/debundle-context.sh
|
6
|
+
|
7
|
+
. ./.circleci/helpers/setup.sh
|
8
|
+
|
9
|
+
. ./.circleci/helpers/test_unit.sh
|
10
|
+
|
11
|
+
. ./.circleci/helpers/test_integration.sh
|
12
|
+
|
13
|
+
. ./.circleci/helpers/build_gem.sh
|
14
|
+
|
15
|
+
. ./.circleci/helpers/build_docs.sh
|
16
|
+
|
17
|
+
. ./.circleci/helpers/release_gem.sh
|
18
|
+
|
19
|
+
. ./.circleci/helpers/publish_docs.sh
|
20
|
+
|
21
|
+
. ./.circleci/helpers/finalize_release.sh
|