runway-ruby 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.tool-versions +1 -0
  3. data/LICENSE.txt +21 -0
  4. data/OPENAPI_VALIDATION.md +100 -0
  5. data/README.md +789 -0
  6. data/Rakefile +11 -0
  7. data/lib/runway_ml/character_performance.rb +106 -0
  8. data/lib/runway_ml/client.rb +84 -0
  9. data/lib/runway_ml/contract_validator.rb +151 -0
  10. data/lib/runway_ml/errors.rb +179 -0
  11. data/lib/runway_ml/image_processor.rb +128 -0
  12. data/lib/runway_ml/image_to_video.rb +158 -0
  13. data/lib/runway_ml/media_processor.rb +343 -0
  14. data/lib/runway_ml/openapi_spec_loader.rb +120 -0
  15. data/lib/runway_ml/organization.rb +89 -0
  16. data/lib/runway_ml/sound_effect.rb +57 -0
  17. data/lib/runway_ml/spec_coverage_analyzer.rb +134 -0
  18. data/lib/runway_ml/speech_to_speech.rb +90 -0
  19. data/lib/runway_ml/task.rb +116 -0
  20. data/lib/runway_ml/test_client.rb +62 -0
  21. data/lib/runway_ml/text_to_speech.rb +52 -0
  22. data/lib/runway_ml/text_to_video.rb +103 -0
  23. data/lib/runway_ml/uploads.rb +74 -0
  24. data/lib/runway_ml/validator_builder.rb +95 -0
  25. data/lib/runway_ml/validators/base_validators.rb +338 -0
  26. data/lib/runway_ml/validators/character_performance_validator.rb +41 -0
  27. data/lib/runway_ml/validators/gen3a_turbo_validator.rb +48 -0
  28. data/lib/runway_ml/validators/gen4_turbo_validator.rb +50 -0
  29. data/lib/runway_ml/validators/prompt_image_validator.rb +97 -0
  30. data/lib/runway_ml/validators/sound_effect_validator.rb +27 -0
  31. data/lib/runway_ml/validators/speech_to_speech_validator.rb +57 -0
  32. data/lib/runway_ml/validators/text_to_speech_validator.rb +28 -0
  33. data/lib/runway_ml/validators/text_veo3_stable_validator.rb +35 -0
  34. data/lib/runway_ml/validators/text_veo3_validator.rb +33 -0
  35. data/lib/runway_ml/validators/uploads_validator.rb +44 -0
  36. data/lib/runway_ml/validators/veo3_stable_validator.rb +43 -0
  37. data/lib/runway_ml/validators/veo3_validator.rb +46 -0
  38. data/lib/runway_ml/validators/voice_dubbing_validator.rb +128 -0
  39. data/lib/runway_ml/validators/voice_isolation_validator.rb +35 -0
  40. data/lib/runway_ml/validators/voice_validator.rb +32 -0
  41. data/lib/runway_ml/version.rb +5 -0
  42. data/lib/runway_ml/voice_dubbing.rb +74 -0
  43. data/lib/runway_ml/voice_isolation.rb +57 -0
  44. data/lib/runway_ml.rb +81 -0
  45. data/lib/tasks/openapi.rake +33 -0
  46. metadata +90 -0
data/lib/runway_ml.rb ADDED
@@ -0,0 +1,81 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "runway_ml/version"
4
+ require_relative "runway_ml/errors"
5
+ require_relative "runway_ml/task"
6
+ require_relative "runway_ml/client"
7
+ require_relative "runway_ml/image_processor"
8
+ require_relative "runway_ml/media_processor"
9
+ require_relative "runway_ml/image_to_video"
10
+ require_relative "runway_ml/text_to_video"
11
+ require_relative "runway_ml/character_performance"
12
+ require_relative "runway_ml/sound_effect"
13
+ require_relative "runway_ml/speech_to_speech"
14
+ require_relative "runway_ml/text_to_speech"
15
+ require_relative "runway_ml/voice_dubbing"
16
+ require_relative "runway_ml/voice_isolation"
17
+ require_relative "runway_ml/uploads"
18
+ require_relative "runway_ml/organization"
19
+
20
+ module RunwayML
21
+ class << self
22
+ attr_accessor :client_class
23
+ attr_accessor :test_client
24
+ end
25
+
26
+ self.client_class = Client
27
+
28
+ def self.client(api_secret: ENV["RUNWAY_API_SECRET"])
29
+ return test_client if test_client
30
+
31
+ client_class.new(api_secret: api_secret)
32
+ end
33
+
34
+ def self.image_to_video(api_secret: ENV["RUNWAY_API_SECRET"], **params)
35
+ ImageToVideo.new(client: client(api_secret: api_secret)).create(**params)
36
+ end
37
+
38
+ def self.text_to_video(api_secret: ENV["RUNWAY_API_SECRET"], **params)
39
+ TextToVideo.new(client: client(api_secret: api_secret)).create(**params)
40
+ end
41
+
42
+ def self.character_performance(api_secret: ENV["RUNWAY_API_SECRET"], **params)
43
+ CharacterPerformance.new(client: client(api_secret: api_secret)).create(**params)
44
+ end
45
+
46
+ def self.sound_effect(api_secret: ENV["RUNWAY_API_SECRET"], **params)
47
+ SoundEffect.new(client: client(api_secret: api_secret)).create(**params)
48
+ end
49
+
50
+ def self.speech_to_speech(api_secret: ENV["RUNWAY_API_SECRET"], **params)
51
+ SpeechToSpeech.new(client: client(api_secret: api_secret)).create(**params)
52
+ end
53
+
54
+ def self.text_to_speech(api_secret: ENV["RUNWAY_API_SECRET"], **params)
55
+ TextToSpeech.new(client: client(api_secret: api_secret)).create(**params)
56
+ end
57
+
58
+ def self.voice_dubbing(api_secret: ENV["RUNWAY_API_SECRET"], **params)
59
+ VoiceDubbing.new(client: client(api_secret: api_secret)).create(**params)
60
+ end
61
+
62
+ def self.voice_isolation(api_secret: ENV["RUNWAY_API_SECRET"], **params)
63
+ VoiceIsolation.new(client: client(api_secret: api_secret)).create(**params)
64
+ end
65
+
66
+ def self.uploads(api_secret: ENV["RUNWAY_API_SECRET"])
67
+ Uploads.new(client: client(api_secret: api_secret))
68
+ end
69
+
70
+ def self.organization(api_secret: ENV["RUNWAY_API_SECRET"])
71
+ Organization.new(client: client(api_secret: api_secret))
72
+ end
73
+
74
+ def self.task_retrieve(id, api_secret: ENV["RUNWAY_API_SECRET"])
75
+ Task.new(id: id, client: client(api_secret: api_secret)).retrieve
76
+ end
77
+
78
+ def self.task_delete(id, api_secret: ENV["RUNWAY_API_SECRET"])
79
+ Task.new(id: id, client: client(api_secret: api_secret)).delete
80
+ end
81
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :spec do
4
+ desc "Analyze SDK spec coverage against OpenAPI"
5
+ task :coverage do
6
+ require File.expand_path("../../runway_ml", __FILE__)
7
+ require File.expand_path("../../runway_ml/openapi_spec_loader", __FILE__)
8
+ require File.expand_path("../../runway_ml/spec_coverage_analyzer", __FILE__)
9
+
10
+ puts "\nLoading OpenAPI specification..."
11
+ RunwayML::SpecCoverageAnalyzer.print_coverage_report
12
+ end
13
+
14
+ desc "Validate SDK against OpenAPI contract"
15
+ task :validate do
16
+ require File.expand_path("../../runway_ml", __FILE__)
17
+ require File.expand_path("../../runway_ml/openapi_spec_loader", __FILE__)
18
+ require File.expand_path("../../runway_ml/contract_validator", __FILE__)
19
+ require File.expand_path("../../runway_ml/validator_builder", __FILE__)
20
+
21
+ puts "\nRunning OpenAPI contract validation..."
22
+ puts "This ensures all SDK methods match the OpenAPI spec.\n"
23
+
24
+ # Run RSpec on the contract tests
25
+ system("rspec spec/runway_ml/openapi_contract_spec.rb -f progress")
26
+ end
27
+ end
28
+
29
+ desc "Run OpenAPI contract tests"
30
+ task "openapi:contract": "spec:validate"
31
+
32
+ desc "Check SDK spec coverage"
33
+ task "openapi:coverage": "spec:coverage"
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: runway-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Oriol Gual
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2026-02-10 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Lets you integrate Runway's generative models into your Ruby applications.
14
+ email:
15
+ - oriol.gual@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".tool-versions"
21
+ - LICENSE.txt
22
+ - OPENAPI_VALIDATION.md
23
+ - README.md
24
+ - Rakefile
25
+ - lib/runway_ml.rb
26
+ - lib/runway_ml/character_performance.rb
27
+ - lib/runway_ml/client.rb
28
+ - lib/runway_ml/contract_validator.rb
29
+ - lib/runway_ml/errors.rb
30
+ - lib/runway_ml/image_processor.rb
31
+ - lib/runway_ml/image_to_video.rb
32
+ - lib/runway_ml/media_processor.rb
33
+ - lib/runway_ml/openapi_spec_loader.rb
34
+ - lib/runway_ml/organization.rb
35
+ - lib/runway_ml/sound_effect.rb
36
+ - lib/runway_ml/spec_coverage_analyzer.rb
37
+ - lib/runway_ml/speech_to_speech.rb
38
+ - lib/runway_ml/task.rb
39
+ - lib/runway_ml/test_client.rb
40
+ - lib/runway_ml/text_to_speech.rb
41
+ - lib/runway_ml/text_to_video.rb
42
+ - lib/runway_ml/uploads.rb
43
+ - lib/runway_ml/validator_builder.rb
44
+ - lib/runway_ml/validators/base_validators.rb
45
+ - lib/runway_ml/validators/character_performance_validator.rb
46
+ - lib/runway_ml/validators/gen3a_turbo_validator.rb
47
+ - lib/runway_ml/validators/gen4_turbo_validator.rb
48
+ - lib/runway_ml/validators/prompt_image_validator.rb
49
+ - lib/runway_ml/validators/sound_effect_validator.rb
50
+ - lib/runway_ml/validators/speech_to_speech_validator.rb
51
+ - lib/runway_ml/validators/text_to_speech_validator.rb
52
+ - lib/runway_ml/validators/text_veo3_stable_validator.rb
53
+ - lib/runway_ml/validators/text_veo3_validator.rb
54
+ - lib/runway_ml/validators/uploads_validator.rb
55
+ - lib/runway_ml/validators/veo3_stable_validator.rb
56
+ - lib/runway_ml/validators/veo3_validator.rb
57
+ - lib/runway_ml/validators/voice_dubbing_validator.rb
58
+ - lib/runway_ml/validators/voice_isolation_validator.rb
59
+ - lib/runway_ml/validators/voice_validator.rb
60
+ - lib/runway_ml/version.rb
61
+ - lib/runway_ml/voice_dubbing.rb
62
+ - lib/runway_ml/voice_isolation.rb
63
+ - lib/tasks/openapi.rake
64
+ homepage: https://github.com/oriolgual/runway-ruby
65
+ licenses:
66
+ - MIT
67
+ metadata:
68
+ allowed_push_host: https://rubygems.org
69
+ homepage_uri: https://github.com/oriolgual/runway-ruby
70
+ source_code_uri: https://github.com/oriolgual/runway-ruby
71
+ post_install_message:
72
+ rdoc_options: []
73
+ require_paths:
74
+ - lib
75
+ required_ruby_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: 3.2.0
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ requirements: []
86
+ rubygems_version: 3.5.16
87
+ signing_key:
88
+ specification_version: 4
89
+ summary: A Ruby client for RunwayML's API.
90
+ test_files: []