animate_it 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -1
- data/README.md +53 -9
- data/app/controllers/animate_it/application_controller.rb +2 -1
- data/lib/animate_it/scene.rb +4 -2
- data/lib/animate_it/version.rb +1 -1
- metadata +30 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb4e829854a53280979963178429b03b60d9deaf1350b26f06d5f30a69cc44fb
|
|
4
|
+
data.tar.gz: c1b96fbeb407a50e073a7e2e59df91d9287d3e02f6df7bdf6b2aef7053628e45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4cfbbca87fe87459fed715f909d3c80743dc2ff1da0df7fc9acf82daf1e9d9319993a8733d2e417e5b46cd477becd2c7f716947f1fdf33c1707e173626c95b8
|
|
7
|
+
data.tar.gz: 034c051d6bb5a16f98a4682caee7c0290fb80ca6a0289735b71447246592ad003eb96f869b7da3d920e30c758cceac88d87d8f3831bbe1c2739366a61ec71d10
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,21 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.2.0] - 2026-07-09
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- Scene sidecar templates can now be authored in ERB (`canvas.html.erb`) as well
|
|
13
|
+
as HAML — Rails resolves whichever exists, so HAML and ERB scenes can be mixed
|
|
14
|
+
in one app.
|
|
15
|
+
- Test matrix across Rails 7.2 and 8.1 on Ruby 3.3 and 3.4, via Appraisal.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Lowered the minimum supported versions to Rails >= 7.2 and Ruby >= 3.3
|
|
19
|
+
(previously Rails >= 8.1.3, Ruby >= 3.4).
|
|
20
|
+
- HAML is now a runtime dependency, so the Studio UI and HAML scenes render on
|
|
21
|
+
any host without the host having to add HAML itself (fixes an ERB-only host
|
|
22
|
+
crashing when mounting the Studio).
|
|
23
|
+
|
|
9
24
|
## [0.1.0] - 2026-07-08
|
|
10
25
|
|
|
11
26
|
### Added
|
|
@@ -20,5 +35,6 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
20
35
|
- `render_animate_it_video` executable and `animate_it:render` rake task.
|
|
21
36
|
- `animate_it:install` generator.
|
|
22
37
|
|
|
23
|
-
[Unreleased]: https://github.com/growth-constant/animate_it/compare/v0.
|
|
38
|
+
[Unreleased]: https://github.com/growth-constant/animate_it/compare/v0.2.0...HEAD
|
|
39
|
+
[0.2.0]: https://github.com/growth-constant/animate_it/compare/v0.1.0...v0.2.0
|
|
24
40
|
[0.1.0]: https://github.com/growth-constant/animate_it/releases/tag/v0.1.0
|
data/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-dark.svg">
|
|
4
|
+
<img src="assets/logo.svg" alt="AnimateIt" width="360">
|
|
5
|
+
</picture>
|
|
3
6
|
</p>
|
|
4
7
|
|
|
5
8
|
<p align="center">
|
|
6
|
-
<strong>
|
|
7
|
-
|
|
9
|
+
<strong>Remotion for Rails.</strong> Make videos from your app's own components and data,
|
|
10
|
+
written in Ruby — no React, no video editor, no After Effects.
|
|
8
11
|
</p>
|
|
9
12
|
|
|
10
13
|
<p align="center">
|
|
@@ -15,14 +18,23 @@
|
|
|
15
18
|
|
|
16
19
|
---
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
[Remotion](https://www.remotion.dev/) made it possible to build videos in React.
|
|
22
|
+
**AnimateIt brings the same idea to Ruby on Rails** — without React, a JavaScript
|
|
23
|
+
project, or a video editor.
|
|
24
|
+
|
|
25
|
+
You describe a video as a Ruby class and a HAML template, preview it frame-by-frame
|
|
26
|
+
in a bundled **Studio** UI, and render it to MP4/WebM/MOV/GIF. Every frame is a real
|
|
27
|
+
web page, so you get the full power of CSS and — crucially — **your app's own
|
|
28
|
+
components, styles, fonts, and real data**. A headless browser captures each frame
|
|
29
|
+
and FFmpeg stitches them into a video.
|
|
30
|
+
|
|
31
|
+
It's built for indie hackers and Rails developers who want to promote their projects
|
|
32
|
+
with polished product demos, launch clips, and social ads — reusing the UI they've
|
|
33
|
+
already built, staying in Ruby, and skipping the whole "learn a video editor" detour.
|
|
22
34
|
|
|
23
35
|
## Requirements
|
|
24
36
|
|
|
25
|
-
- Ruby >= 3.
|
|
37
|
+
- Ruby >= 3.3, Rails >= 7.2 (tested against Rails 7.2 and 8.1)
|
|
26
38
|
- **FFmpeg** on the PATH (rendering)
|
|
27
39
|
- **Node + Playwright** with a Chromium build (rendering): `npx playwright install chromium`
|
|
28
40
|
- **HAML** (composition sidecar templates + Studio views)
|
|
@@ -99,6 +111,23 @@ CSS-variable bag (`animation_vars`), named `beat`s, and `audio` / `audio_loop`
|
|
|
99
111
|
tracks are all available. Compositions can render your app's real partials and
|
|
100
112
|
ViewComponents — see `AnimateIt.config.render_stylesheets` below.
|
|
101
113
|
|
|
114
|
+
### HAML or ERB
|
|
115
|
+
|
|
116
|
+
Scene sidecar templates can be authored in **HAML** (`canvas.html.haml`) or
|
|
117
|
+
**ERB** (`canvas.html.erb`) — Rails resolves whichever file exists, so you can
|
|
118
|
+
mix engines across scenes. The HAML canvas above is equivalent to:
|
|
119
|
+
|
|
120
|
+
```erb
|
|
121
|
+
-# app/videos/hello_video/canvas.html.erb
|
|
122
|
+
<style>.title { opacity: var(--title-opacity, 1); font-size: 6rem; font-weight: 800; }</style>
|
|
123
|
+
<div class="stage" style="<%= @vars %>">
|
|
124
|
+
<div class="title">Hello 👋</div>
|
|
125
|
+
</div>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
The gem bundles HAML for its own Studio UI, so you never need to add HAML to your
|
|
129
|
+
app to use it — ERB-only apps work out of the box.
|
|
130
|
+
|
|
102
131
|
## Rendering
|
|
103
132
|
|
|
104
133
|
The renderer needs your Rails **server running** (it drives a real browser against
|
|
@@ -156,11 +185,26 @@ bundle exec rubocop
|
|
|
156
185
|
|
|
157
186
|
# full render smoke test (needs ffmpeg + Playwright chromium)
|
|
158
187
|
RUN_RENDER_SMOKE=1 bundle exec rspec spec/rendering_spec.rb
|
|
188
|
+
|
|
189
|
+
# run the suite against a specific Rails version (see Appraisals)
|
|
190
|
+
bundle exec appraisal install
|
|
191
|
+
bundle exec appraisal rails-7.2 rspec
|
|
192
|
+
bundle exec appraisal rails-8.1 rspec
|
|
159
193
|
```
|
|
160
194
|
|
|
161
195
|
Specs run against a minimal host app in `spec/dummy` — no external services, no
|
|
162
196
|
database.
|
|
163
197
|
|
|
198
|
+
## Credits
|
|
199
|
+
|
|
200
|
+
AnimateIt is inspired by [**Remotion**](https://www.remotion.dev) — the framework
|
|
201
|
+
that pioneered making videos programmatically in React. AnimateIt brings that
|
|
202
|
+
"videos as code" idea to the Ruby on Rails ecosystem, natively and without React.
|
|
203
|
+
Huge thanks to the Remotion team for the inspiration.
|
|
204
|
+
|
|
164
205
|
## License
|
|
165
206
|
|
|
166
|
-
[MIT](MIT-LICENSE)
|
|
207
|
+
AnimateIt is released under the [**MIT License**](MIT-LICENSE) — free and open source,
|
|
208
|
+
with **no restrictions on commercial or business use**. Individuals, startups,
|
|
209
|
+
agencies, and companies of any size can use it in open-source and closed-source
|
|
210
|
+
projects at no cost, forever. No paid tiers, no seat limits.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
module AnimateIt
|
|
2
2
|
class ApplicationController < ActionController::Base
|
|
3
|
-
# Composition sidecar templates live at app/videos/<composition>/*.html
|
|
3
|
+
# Composition sidecar templates live at app/videos/<composition>/*.html.*
|
|
4
4
|
# in the host app — outside the engine's view path, so add it explicitly.
|
|
5
|
+
# Sidecars may be HAML or ERB; Rails' lookup resolves whichever exists.
|
|
5
6
|
prepend_view_path Rails.root.join("app/videos")
|
|
6
7
|
|
|
7
8
|
# Sidecar templates routinely render host-app partials (e.g. the real
|
data/lib/animate_it/scene.rb
CHANGED
|
@@ -15,8 +15,10 @@ module AnimateIt
|
|
|
15
15
|
# ----- class-level DSL -----------------------------------------------
|
|
16
16
|
class << self
|
|
17
17
|
# Sidecar template name. Defaults to "canvas" — i.e. a scene whose
|
|
18
|
-
# composition is `MyHero` looks for `app/videos/my_hero/canvas.html
|
|
19
|
-
#
|
|
18
|
+
# composition is `MyHero` looks for `app/videos/my_hero/canvas.html.*`.
|
|
19
|
+
# The sidecar may be authored in HAML (`canvas.html.haml`) or ERB
|
|
20
|
+
# (`canvas.html.erb`); Rails resolves whichever exists. Override to point
|
|
21
|
+
# to a sibling template instead.
|
|
20
22
|
def template(name = nil)
|
|
21
23
|
@template = name.to_s if name
|
|
22
24
|
@template ||= "canvas"
|
data/lib/animate_it/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: animate_it
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- growth-constant
|
|
@@ -9,26 +9,45 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: haml
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '6.3'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '6.3'
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: rails
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
15
29
|
requirements:
|
|
16
30
|
- - ">="
|
|
17
31
|
- !ruby/object:Gem::Version
|
|
18
|
-
version:
|
|
32
|
+
version: '7.2'
|
|
19
33
|
type: :runtime
|
|
20
34
|
prerelease: false
|
|
21
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
36
|
requirements:
|
|
23
37
|
- - ">="
|
|
24
38
|
- !ruby/object:Gem::Version
|
|
25
|
-
version:
|
|
39
|
+
version: '7.2'
|
|
26
40
|
description: |
|
|
27
|
-
AnimateIt
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
AnimateIt brings Remotion-style programmatic video to Ruby on Rails — without
|
|
42
|
+
React or a JavaScript project. Build videos as code: a Ruby class plus a HAML
|
|
43
|
+
template, using your app's own components, styles, fonts, and real data. Every
|
|
44
|
+
frame is a real web page, so anything you can render in your app you can put in
|
|
45
|
+
a video. Preview frame-by-frame in the bundled Studio, then export to
|
|
46
|
+
MP4/WebM/MOV/GIF with headless Chromium (Playwright) + FFmpeg.
|
|
47
|
+
|
|
48
|
+
Built for indie hackers and Rails developers who want to promote their projects
|
|
49
|
+
with polished product demos, launch clips, and social ads — without leaving
|
|
50
|
+
Ruby, hiring an editor, or learning After Effects.
|
|
32
51
|
executables:
|
|
33
52
|
- render_animate_it_video
|
|
34
53
|
extensions: []
|
|
@@ -106,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
106
125
|
requirements:
|
|
107
126
|
- - ">="
|
|
108
127
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: '3.
|
|
128
|
+
version: '3.3'
|
|
110
129
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
130
|
requirements:
|
|
112
131
|
- - ">="
|
|
@@ -115,6 +134,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
115
134
|
requirements: []
|
|
116
135
|
rubygems_version: 3.6.9
|
|
117
136
|
specification_version: 4
|
|
118
|
-
summary:
|
|
119
|
-
|
|
137
|
+
summary: Remotion for Rails — make videos with your app's own assets, in Ruby. No
|
|
138
|
+
React required.
|
|
120
139
|
test_files: []
|