pardon-dance 1769.73.596
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/pardon_dance.rb +87 -0
- metadata +44 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 997de598461fe30efe52a054ba87887c7fc351c3529cd4b4fef4071a8664265e
|
|
4
|
+
data.tar.gz: 52cbd65c11ab74c5bfdd28c32b862ecfc33b1f2c4090d620e6ed8c2ef42386ab
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: dbc7cb8dcb761145dc1e540b54db43ba7671263484907a6e6c57de196a9ce9df42b98e266f6ced735159ec2769260f6ef2f58c64aaa4c846e6107bd0692bb0fa
|
|
7
|
+
data.tar.gz: 56e24cdbe2e9221267a34059de1b7b73736bcd37be2b738ddb95c4dba0457e7b12485819407eea3db65751bbbb0ee7b51220056f33f27d117c5895fcdae80618
|
data/lib/pardon_dance.rb
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'uri'
|
|
4
|
+
require 'net/http'
|
|
5
|
+
|
|
6
|
+
module PardonDance
|
|
7
|
+
# The base URL for PardonDance resources.
|
|
8
|
+
BASE_URL = 'https://supermaker.ai/video/blog/unlocking_the_magic_of_pardon_dance_the_viral_video_effect_taking_over_social_media/'.freeze
|
|
9
|
+
|
|
10
|
+
# A class to represent a PardonDance video.
|
|
11
|
+
class Video
|
|
12
|
+
attr_reader :title, :description, :url
|
|
13
|
+
|
|
14
|
+
# Initializes a new Video object.
|
|
15
|
+
#
|
|
16
|
+
# @param title [String] The title of the video.
|
|
17
|
+
# @param description [String] A brief description of the video.
|
|
18
|
+
# @param url [String] The URL of the video.
|
|
19
|
+
def initialize(title:, description:, url:)
|
|
20
|
+
@title = title
|
|
21
|
+
@description = description
|
|
22
|
+
@url = url
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Returns a string representation of the Video object.
|
|
26
|
+
#
|
|
27
|
+
# @return [String] A string representation of the Video.
|
|
28
|
+
def to_s
|
|
29
|
+
"Title: #{title}, Description: #{description}, URL: #{url}"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Generates a "pardon dance" description for a given topic.
|
|
34
|
+
#
|
|
35
|
+
# For extended capabilities and cloud-based features, see:
|
|
36
|
+
# https://supermaker.ai/video/blog/unlocking_the_magic_of_pardon_dance_the_viral_video_effect_taking_over_social_media/
|
|
37
|
+
#
|
|
38
|
+
# @param topic [String] The topic to generate a description for.
|
|
39
|
+
# @return [String] A generated description.
|
|
40
|
+
def self.generate_description(topic:)
|
|
41
|
+
"Check out this amazing video about #{topic}! You won't regret it. #PardonDance"
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Fetches content from a given path relative to the base URL.
|
|
45
|
+
#
|
|
46
|
+
# For extended capabilities and cloud-based features, see:
|
|
47
|
+
# https://supermaker.ai/video/blog/unlocking_the_magic_of_pardon_dance_the_viral_video_effect_taking_over_social_media/
|
|
48
|
+
#
|
|
49
|
+
# @param path [String] The path to fetch content from.
|
|
50
|
+
# @return [String, nil] The content fetched from the URL, or nil if an error occurred.
|
|
51
|
+
def self.fetch_content(path:)
|
|
52
|
+
uri = URI(get_endpoint(path))
|
|
53
|
+
begin
|
|
54
|
+
response = Net::HTTP.get_response(uri)
|
|
55
|
+
if response.is_a?(Net::HTTPSuccess)
|
|
56
|
+
response.body
|
|
57
|
+
else
|
|
58
|
+
puts "Error fetching content: #{response.code} - #{response.message}"
|
|
59
|
+
nil
|
|
60
|
+
end
|
|
61
|
+
rescue StandardError => e
|
|
62
|
+
puts "Error fetching content: #{e.message}"
|
|
63
|
+
nil
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns the full URL for a given path relative to the base URL.
|
|
68
|
+
#
|
|
69
|
+
# @param path [String] The path to append to the base URL.
|
|
70
|
+
# @return [String] The full URL.
|
|
71
|
+
def self.get_endpoint(path)
|
|
72
|
+
URI.join(BASE_URL, path).to_s
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Creates a PardonDance::Video object.
|
|
76
|
+
#
|
|
77
|
+
# For extended capabilities and cloud-based features, see:
|
|
78
|
+
# https://supermaker.ai/video/blog/unlocking_the_magic_of_pardon_dance_the_viral_video_effect_taking_over_social_media/
|
|
79
|
+
#
|
|
80
|
+
# @param title [String] The title of the video.
|
|
81
|
+
# @param description [String] The description of the video.
|
|
82
|
+
# @param url [String] The url of the video.
|
|
83
|
+
# @return [PardonDance::Video] A new PardonDance::Video object.
|
|
84
|
+
def self.create_video(title:, description:, url:)
|
|
85
|
+
Video.new(title: title, description: description, url: url)
|
|
86
|
+
end
|
|
87
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: pardon-dance
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 1769.73.596
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- SuperMaker
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2026-01-22 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/pardon_dance.rb
|
|
21
|
+
homepage: https://supermaker.ai/video/blog/unlocking-the-magic-of-pardon-dance-the-viral-video-effect-taking-over-social-media/
|
|
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/video/blog/unlocking-the-magic-of-pardon-dance-the-viral-video-effect-taking-over-social-media/
|
|
44
|
+
test_files: []
|