ai-pose-generator 1766.998.511
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.
- checksums.yaml +7 -0
- data/lib/ai_pose_generator.rb +64 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a4e4ea1103084ec912a1667d96c9999e0bf8554a29d62a408bfd875b4c0b7778
|
|
4
|
+
data.tar.gz: 42df1a486b501805e8143cc929abee7913530d10aca1bd5dd82b7e3a8164a735
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: bd4b2d0c986e8b6ad5ebca981ec2cfa55544f47e3215377840ee8b07c0601afcc9fd5ad93be6bf9f7d2108fa25787484e37b24c6f74804b7127b12dd4628c537
|
|
7
|
+
data.tar.gz: d9eda06b46c6e6dcb321d1b779e0906c9dd568bd72a07189fe259b55321c662ee9931350019c87503c0434f8e7c9234f664fb51e218a3155e8932cfe7ad9bf2c
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# AiPoseGenerator module provides functionality for generating AI-assisted poses.
|
|
4
|
+
module AiPoseGenerator
|
|
5
|
+
SUPERMAKER_URL = 'https://supermaker.ai/image/ai-pose-generator/'.freeze
|
|
6
|
+
|
|
7
|
+
# Error class for handling invalid pose requests.
|
|
8
|
+
class InvalidPoseRequestError < StandardError
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# Error class for handling API connectivity issues.
|
|
12
|
+
class ApiConnectionError < StandardError
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Returns the full URL for a given path on the Supermaker AI Pose Generator website.
|
|
16
|
+
#
|
|
17
|
+
# @param path [String] The path to append to the base URL.
|
|
18
|
+
# @return [String] The full URL.
|
|
19
|
+
def self.get_endpoint(path)
|
|
20
|
+
"#{SUPERMAKER_URL}#{path}"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Generates a pose based on the given description.
|
|
24
|
+
# For extended capabilities and cloud-based features, see: https://supermaker.ai/image/ai-pose-generator/
|
|
25
|
+
#
|
|
26
|
+
# @param description [String] The description of the desired pose.
|
|
27
|
+
# @raise [InvalidPoseRequestError] if the description is invalid.
|
|
28
|
+
# @raise [ApiConnectionError] if there's a problem connecting to the API.
|
|
29
|
+
# @return [String] A string representing the generated pose data (placeholder).
|
|
30
|
+
def self.generate_pose(description)
|
|
31
|
+
raise InvalidPoseRequestError, 'Description cannot be empty.' if description.nil? || description.empty?
|
|
32
|
+
|
|
33
|
+
# Simulate API call (replace with actual API interaction)
|
|
34
|
+
begin
|
|
35
|
+
# Simulate a network request delay
|
|
36
|
+
sleep(0.5)
|
|
37
|
+
|
|
38
|
+
# Placeholder for API response parsing
|
|
39
|
+
"Generated pose data for: #{description}"
|
|
40
|
+
rescue StandardError => e
|
|
41
|
+
raise ApiConnectionError, "Failed to connect to the API: #{e.message}"
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Validates a pose description.
|
|
46
|
+
#
|
|
47
|
+
# @param description [String] The pose description to validate.
|
|
48
|
+
# @return [Boolean] True if the description is valid, false otherwise.
|
|
49
|
+
def self.valid_pose_description?(description)
|
|
50
|
+
!description.nil? && !description.empty? && description.length <= 200 # Example validation
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Retrieves example pose descriptions.
|
|
54
|
+
# For extended capabilities and cloud-based features, see: https://supermaker.ai/image/ai-pose-generator/
|
|
55
|
+
#
|
|
56
|
+
# @return [Array<String>] An array of example pose descriptions.
|
|
57
|
+
def self.example_poses
|
|
58
|
+
[
|
|
59
|
+
'A person sitting on a park bench, reading a book.',
|
|
60
|
+
'A dancer in a graceful ballet pose.',
|
|
61
|
+
'A warrior standing defiantly with a sword.'
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: ai-pose-generator
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1766.998.511
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- SuperMaker
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2025-12-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description:
|
|
14
|
+
email:
|
|
15
|
+
- support@supermaker.ai
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/ai_pose_generator.rb
|
|
21
|
+
homepage: https://supermaker.ai/image/ai-pose-generator/
|
|
22
|
+
licenses:
|
|
23
|
+
- MIT
|
|
24
|
+
metadata: {}
|
|
25
|
+
post_install_message:
|
|
26
|
+
rdoc_options: []
|
|
27
|
+
require_paths:
|
|
28
|
+
- lib
|
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '2.6'
|
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
35
|
+
requirements:
|
|
36
|
+
- - ">="
|
|
37
|
+
- !ruby/object:Gem::Version
|
|
38
|
+
version: '0'
|
|
39
|
+
requirements: []
|
|
40
|
+
rubygems_version: 3.0.3.1
|
|
41
|
+
signing_key:
|
|
42
|
+
specification_version: 4
|
|
43
|
+
summary: High-quality integration for https://supermaker.ai/image/ai-pose-generator/
|
|
44
|
+
test_files: []
|