rabbit-slide-hasumikin-RubyWorldConference2026 2026.12.03.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 +7 -0
- data/.rabbit +2 -0
- data/README.md +32 -0
- data/REST Rebooted - What Funicular on Rails Carries.pdf +0 -0
- data/RESTRebooted.md +409 -0
- data/Rakefile +17 -0
- data/config.yaml +24 -0
- data/images/bg-slide.png +0 -0
- data/images/bg-title.png +0 -0
- data/images/bugs22082.png +0 -0
- data/images/bugs22118.png +0 -0
- data/images/funicolare.jpg +0 -0
- data/images/funicular-rest.svg +68 -0
- data/images/hasumi.jpg +0 -0
- data/images/item24.png +0 -0
- data/images/item30.png +0 -0
- data/images/item36.png +0 -0
- data/images/kou1.png +0 -0
- data/images/kou2.png +0 -0
- data/images/kou3.png +0 -0
- data/images/matz.png +0 -0
- data/images/network-304.png +0 -0
- data/pdf/RubyWorldConference2026-RESTRebooted.pdf +0 -0
- data/theme.rb +206 -0
- metadata +78 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 62bfe0f307059a500c3c460b26b1d4355839e3edc270ddf4beaf676a35c8c57e
|
|
4
|
+
data.tar.gz: d24e27a327f2b2647074ac40b0ba9d488586720c1abcbce69c426f83380793a8
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 26208682ac7a3aa0c08c0fcabac27e0a754d0804e5a40f85ce1a6b0fa6214624d128772e494734e5ab7e2ab5cd6abcc02fa947ee04956eb58ee03fbafa0ac19a
|
|
7
|
+
data.tar.gz: cbea14df4df8f2c07b8df2d30c5a6f4a380bb02eff1783ea65718085964d54c73d86c1134726546e7ce377b4854fce42291942984b115edbfd44430bfc9eb469
|
data/.rabbit
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# REST Rebooted: What Funicular on Rails Carries
|
|
2
|
+
|
|
3
|
+
Presentation slide for RubyWorld Conference 2026
|
|
4
|
+
|
|
5
|
+
## For author
|
|
6
|
+
|
|
7
|
+
### Show
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
rake
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
# Publish
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
rake publish
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## For viewers
|
|
20
|
+
|
|
21
|
+
### Install
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
gem install rabbit-slide-hasumikin-RubyWorldConference2026
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Show
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
rabbit rabbit-slide-hasumikin-RubyWorldConference2026.gem
|
|
31
|
+
```
|
|
32
|
+
|
|
Binary file
|
data/RESTRebooted.md
ADDED
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
# REST *Rebooted*
|
|
2
|
+
|
|
3
|
+
subtitle
|
|
4
|
+
: What *Funicular* on Rails Carries
|
|
5
|
+
|
|
6
|
+
author
|
|
7
|
+
: hasumikin
|
|
8
|
+
|
|
9
|
+
content-source
|
|
10
|
+
: RubyWorld Conference *2026*
|
|
11
|
+
|
|
12
|
+
date
|
|
13
|
+
: 2026-12-03
|
|
14
|
+
|
|
15
|
+
allotted-time
|
|
16
|
+
: 15m
|
|
17
|
+
|
|
18
|
+
theme
|
|
19
|
+
: theme
|
|
20
|
+
|
|
21
|
+
# self.inspect
|
|
22
|
+
|
|
23
|
+
* Hitoshi HASUMI
|
|
24
|
+
* @hasumikin {::tag name="small"}(GitHub and Twitter){:/tag}
|
|
25
|
+
* Creator of PicoRuby
|
|
26
|
+
* Committer of mruby and mruby/c
|
|
27
|
+
* Work with *ANDPAD, inc.*
|
|
28
|
+
|
|
29
|
+
{:
|
|
30
|
+
align="right"
|
|
31
|
+
relative-height="65"
|
|
32
|
+
relative_margin_top="10"
|
|
33
|
+
relative_margin_left="10"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
# Today I talk about REST
|
|
37
|
+
* In 2026?
|
|
38
|
+
* Yes
|
|
39
|
+
* Why? At the end
|
|
40
|
+
|
|
41
|
+
# REST: *Re*presentational *S*tate *T*ransfer
|
|
42
|
+
* Roy Fielding's doctoral dissertation, 2000
|
|
43
|
+
* Start from a system where *anything is possible*
|
|
44
|
+
* Add six *constraints*, and you get a Web that works
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
1. Client-Server
|
|
48
|
+
2. Stateless
|
|
49
|
+
3. Cache
|
|
50
|
+
4. Uniform Interface
|
|
51
|
+
5. Layered System
|
|
52
|
+
6. Code on Demand (optional)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
{:.center}
|
|
56
|
+
{::tag name="xx-small"}https://ics.uci.edu/~fielding/pubs/dissertation/top.htm{:/tag}
|
|
57
|
+
|
|
58
|
+
# Rails Chose REST 20 years ago
|
|
59
|
+
* DHH, 2006: "Discovering a World of Resources on Rails"
|
|
60
|
+
* It's still the backbone of Rails\\n(even if your AI agent rewrites your Rails app in Rust)
|
|
61
|
+
* One line gives you seven routes: *`resources :posts`*
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
GET /posts index
|
|
65
|
+
GET /posts/new new
|
|
66
|
+
POST /posts create
|
|
67
|
+
GET /posts/:id show
|
|
68
|
+
GET /posts/:id/edit edit
|
|
69
|
+
PATCH /posts/:id update
|
|
70
|
+
DELETE /posts/:id destroy
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
# But on the Frontend
|
|
74
|
+
* The age of the SPA came
|
|
75
|
+
* We write the Rails resources once more, in JavaScript
|
|
76
|
+
* URLs, attributes, validations, error handling
|
|
77
|
+
* "REST is *outdated*"
|
|
78
|
+
|
|
79
|
+
# Here comes *Funicular* [フニクラ]
|
|
80
|
+
* http://picoruby.org/funicular (I'm the author)
|
|
81
|
+
* An SPA framework that runs on PicoRuby.wasm
|
|
82
|
+
* PicoRuby.wasm: 10x smaller than CRuby.wasm
|
|
83
|
+
* Write the frontend in *native Ruby*, no JavaScript
|
|
84
|
+
* Tech details in RubyKaigi 2026
|
|
85
|
+
* The name means a cable car🚞
|
|
86
|
+
* Many features such as SSR
|
|
87
|
+
React-like Component class,
|
|
88
|
+
front-end SQLite3, plugins
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
{:
|
|
92
|
+
align="right"
|
|
93
|
+
relative-height="90"
|
|
94
|
+
relative_margin_top="38"
|
|
95
|
+
relative_margin_left="30"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
{:.right}
|
|
99
|
+
{::tag name="xx-small"}\\n\\n\\n\\n\\n\\n\\n\\n\\nhttps://ja.wikipedia.org/wiki/ヴェスヴィオ{:/tag}
|
|
100
|
+
|
|
101
|
+
# *[New!]* ORM: *O*bject-*R*EST *M*apper
|
|
102
|
+
```
|
|
103
|
+
maps because all speak
|
|
104
|
+
======================================================================
|
|
105
|
+
ActiveRecord tables -> Ruby objects SQL
|
|
106
|
+
----------------------------------------------------------------------
|
|
107
|
+
Object-REST Mapper resources -> Ruby objects REST
|
|
108
|
+
```
|
|
109
|
+
* One mapper fits every table, because every table speaks SQL
|
|
110
|
+
* One mapper fits every resource, *if* every resource obeys REST
|
|
111
|
+
* So, do Rails resources obey the six constraints?
|
|
112
|
+
|
|
113
|
+
# chapter
|
|
114
|
+
|
|
115
|
+
{::tag name="xx-large"}Revisit the Constraints{:/tag}
|
|
116
|
+
|
|
117
|
+
## properties
|
|
118
|
+
hide-title
|
|
119
|
+
: true
|
|
120
|
+
|
|
121
|
+
# Constraints 1, 2, 5
|
|
122
|
+
* 1: Client-Server
|
|
123
|
+
* 2: Stateless
|
|
124
|
+
* 5: Layered System
|
|
125
|
+
* HTTP and Rails have done these all along
|
|
126
|
+
* Funicular adds nothing
|
|
127
|
+
|
|
128
|
+
# chapter
|
|
129
|
+
|
|
130
|
+
Constraint 3
|
|
131
|
+
{::tag name="xx-large"}Cache{:/tag}
|
|
132
|
+
|
|
133
|
+
## properties
|
|
134
|
+
hide-title
|
|
135
|
+
: true
|
|
136
|
+
|
|
137
|
+
# The Rails Code You Always Write
|
|
138
|
+
```ruby
|
|
139
|
+
# app/controllers/posts_controller.rb
|
|
140
|
+
def index
|
|
141
|
+
posts = Post.published
|
|
142
|
+
render json: posts.map { |post| post_summary(post) } if stale?(posts)
|
|
143
|
+
end
|
|
144
|
+
```
|
|
145
|
+
* *`stale?`* returns 304 (Not Modified) when the ETag matches
|
|
146
|
+
* The browser hears the 304. Does your *JavaScript*?
|
|
147
|
+
* Funicular keeps a SQLite3 *replica* in the browser
|
|
148
|
+
* It sends *`If-None-Match`*. On a 304, the replica answers
|
|
149
|
+
|
|
150
|
+
# chapter
|
|
151
|
+
|
|
152
|
+
Constraint 4
|
|
153
|
+
{::tag name="xx-large"}Uniform Interface{:/tag}
|
|
154
|
+
|
|
155
|
+
## properties
|
|
156
|
+
hide-title
|
|
157
|
+
: true
|
|
158
|
+
|
|
159
|
+
# The One the SPA Broke
|
|
160
|
+
```
|
|
161
|
+
4. Uniform Interface Rails + HTML Rails + JSON SPA
|
|
162
|
+
=========================================================================
|
|
163
|
+
Identify resources by URI kept kept
|
|
164
|
+
-------------------------------------------------------------------------
|
|
165
|
+
Manipulate via representations kept kept
|
|
166
|
+
-------------------------------------------------------------------------
|
|
167
|
+
Self-descriptive messages kept *broken*
|
|
168
|
+
-------------------------------------------------------------------------
|
|
169
|
+
Hypermedia as the Engine of APP State kept *broken*
|
|
170
|
+
```
|
|
171
|
+
* URLs and next actions are *hard-coded* in the client
|
|
172
|
+
* What the JSON means is a private agreement
|
|
173
|
+
* Fielding, 2008: "REST APIs must be hypertext-driven"
|
|
174
|
+
|
|
175
|
+
{:.center}
|
|
176
|
+
{::tag name="xx-small"}https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven{:/tag}
|
|
177
|
+
|
|
178
|
+
# Expose Only What You Declare
|
|
179
|
+
```ruby
|
|
180
|
+
# app/controllers/api/schema_controller.rb
|
|
181
|
+
def comment
|
|
182
|
+
render json: Funicular::Schema.build(Comment,
|
|
183
|
+
attributes: {
|
|
184
|
+
"id" => { type: "integer", readonly: true },
|
|
185
|
+
"post_id" => { type: "integer", readonly: false },
|
|
186
|
+
"body" => { type: "string", readonly: false }
|
|
187
|
+
})
|
|
188
|
+
end
|
|
189
|
+
```
|
|
190
|
+
* Declare only the *attributes* to expose
|
|
191
|
+
* *No endpoint* is written anywhere
|
|
192
|
+
|
|
193
|
+
# Ruby in the Browser (PicoRuby.wasm)
|
|
194
|
+
```ruby
|
|
195
|
+
# app/funicular/models/post.rb
|
|
196
|
+
class Post < Funicular::Model
|
|
197
|
+
end
|
|
198
|
+
# app/funicular/models/comment.rb
|
|
199
|
+
class Comment < Funicular::Model
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# a block receives the result { |result, error| ... }
|
|
203
|
+
Post.all # GET /posts
|
|
204
|
+
Post.find(1) # GET /posts/1
|
|
205
|
+
Comment.all(post_id: 1) # GET /posts/1/comments
|
|
206
|
+
Comment.create(post_id: 1, body: "Nice!") # POST /posts/1/comments
|
|
207
|
+
```
|
|
208
|
+
* *`routes.rb`* becomes the methods in the browser
|
|
209
|
+
* Note that the classes are *empty*
|
|
210
|
+
|
|
211
|
+
# Errors Are Uniform Too (demo later)
|
|
212
|
+
```ruby
|
|
213
|
+
# server: app/controllers/comments_controller.rb
|
|
214
|
+
render json: { errors: comment.errors }, status: :unprocessable_content
|
|
215
|
+
# browser
|
|
216
|
+
Comment.create(post_id: 1, body: "HELLO") do |comment, error|
|
|
217
|
+
patch(errors: error.messages) if error
|
|
218
|
+
end
|
|
219
|
+
```
|
|
220
|
+
* Empty: the browser stops it
|
|
221
|
+
(presence comes with the schema)
|
|
222
|
+
* "HELLO": the server stops it
|
|
223
|
+
(a custom validation stays on the server)
|
|
224
|
+
* The same *`errors`*, in the same place
|
|
225
|
+
|
|
226
|
+
# chapter
|
|
227
|
+
|
|
228
|
+
Constraint 6
|
|
229
|
+
{::tag name="xx-large"}Code on Demand{:/tag}
|
|
230
|
+
|
|
231
|
+
## properties
|
|
232
|
+
hide-title
|
|
233
|
+
: true
|
|
234
|
+
|
|
235
|
+
# The Forgotten Constraint
|
|
236
|
+
* The only *optional* one of the six
|
|
237
|
+
* A client downloads code and extends what it does
|
|
238
|
+
* Forgotten? We do it every day: *`<script src="app.js">`*
|
|
239
|
+
* But what arrives is *another language*, *another model*
|
|
240
|
+
|
|
241
|
+
# The *True Face* of Code on Demand
|
|
242
|
+
* The server *delivers* a client that can talk to it
|
|
243
|
+
* The same language
|
|
244
|
+
* The same models
|
|
245
|
+
* The same validations
|
|
246
|
+
|
|
247
|
+
# What *Funicular on Rails Carries*
|
|
248
|
+
```
|
|
249
|
+
Rails ─────────────────────────────────────> Browser
|
|
250
|
+
|
|
251
|
+
picoruby.wasm the Ruby interpreter itself
|
|
252
|
+
app.mrb your components and models
|
|
253
|
+
schema (JSON) attributes, validations, endpoints, associations
|
|
254
|
+
```
|
|
255
|
+
* Validations and associations derive from ActiveRecord
|
|
256
|
+
* The same component also renders on the server (SSR)
|
|
257
|
+
|
|
258
|
+
# chapter
|
|
259
|
+
|
|
260
|
+
{::tag name="xx-large"}Demo : /blog{:/tag}
|
|
261
|
+
{::tag name="small"}👀 Browser: /blog → /blog/1 → back to /blog (304) \\n→ /blog/1 → comment "(blank)" and "HELLO"{:/tag}
|
|
262
|
+
|
|
263
|
+
## properties
|
|
264
|
+
hide-title
|
|
265
|
+
: true
|
|
266
|
+
|
|
267
|
+
# Recap
|
|
268
|
+
```
|
|
269
|
+
REST Constraint The Rails code you always write
|
|
270
|
+
=============================================================
|
|
271
|
+
1. Client-Server
|
|
272
|
+
2. Stateless (HTTP and Rails)
|
|
273
|
+
5. Layered System
|
|
274
|
+
-------------------------------------------------------------
|
|
275
|
+
3. Cache stale?(posts)
|
|
276
|
+
-------------------------------------------------------------
|
|
277
|
+
4. Uniform Interface resources :posts
|
|
278
|
+
belongs_to :post
|
|
279
|
+
render json: { errors: record.errors }
|
|
280
|
+
-------------------------------------------------------------
|
|
281
|
+
6. Code on Demand PicoRuby.wasm + app/funicular/**/*.rb
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
# Funicular and Hotwire
|
|
285
|
+
```
|
|
286
|
+
Hotwire Funicular
|
|
287
|
+
==================================================================
|
|
288
|
+
Stays on Rails + HTML Rails + SPA
|
|
289
|
+
------------------------------------------------------------------
|
|
290
|
+
3. Cache HTTP cache replica + ETag
|
|
291
|
+
------------------------------------------------------------------
|
|
292
|
+
4. Hypermedia links and forms schema (not strict)
|
|
293
|
+
------------------------------------------------------------------
|
|
294
|
+
6. Code on Demand JavaScript Ruby, same models
|
|
295
|
+
------------------------------------------------------------------
|
|
296
|
+
Client-side data little rows and queries
|
|
297
|
+
```
|
|
298
|
+
* Hotwire keeps REST by staying with HTML
|
|
299
|
+
* Funicular brings REST back to the SPA
|
|
300
|
+
* The same belief: REST on Rails is right
|
|
301
|
+
|
|
302
|
+
# chapter
|
|
303
|
+
|
|
304
|
+
{::tag name="xx-large"}Why REST, *Now*?{:/tag}
|
|
305
|
+
|
|
306
|
+
## properties
|
|
307
|
+
hide-title
|
|
308
|
+
: true
|
|
309
|
+
|
|
310
|
+
# The Age of AI
|
|
311
|
+
* With AI, *anything is possible* again
|
|
312
|
+
* Anyone can *build* anything
|
|
313
|
+
* Anyone can *attack* anything
|
|
314
|
+
* The second one is the serious one
|
|
315
|
+
* Fielding started from there, and added *constraints*
|
|
316
|
+
|
|
317
|
+
# Every Hand-Made API Is a Door
|
|
318
|
+
* An AI reads your JS bundle and finds every endpoint
|
|
319
|
+
* It tries every one of them, all night, for almost nothing
|
|
320
|
+
* A hand-made API has hand-made checks
|
|
321
|
+
* A hand-made check is where the hole is
|
|
322
|
+
|
|
323
|
+
# Stay on the Rails with Funicular
|
|
324
|
+
* REST gives every resource the *same shape*
|
|
325
|
+
* Stateless: each request proves who it is
|
|
326
|
+
* Uniform Interface: every message can be inspected in the same way
|
|
327
|
+
* The server has the last word on validations
|
|
328
|
+
* Expose only what you declare: *`user_id`* never leaves the server
|
|
329
|
+
* Predictable for you, your reviewer, and your AI agent
|
|
330
|
+
|
|
331
|
+
# REST Did Not Get Old
|
|
332
|
+
* It ran on the Rails side only
|
|
333
|
+
* A funicular climbs only when two cars share one cable
|
|
334
|
+
|
|
335
|
+
{:
|
|
336
|
+
relative-width="90"
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
# chapter
|
|
340
|
+
|
|
341
|
+
{::tag name="x-large"}A New Journey for Rails and REST{:/tag}
|
|
342
|
+
|
|
343
|
+
https://picoruby.org/funicular
|
|
344
|
+
https://github.com/picoruby/funicular
|
|
345
|
+
https://github.com/hasumikin/funicular-demo
|
|
346
|
+
|
|
347
|
+
## properties
|
|
348
|
+
hide-title
|
|
349
|
+
: true
|
|
350
|
+
|
|
351
|
+
# chapter
|
|
352
|
+
|
|
353
|
+
{::tag name="xx-large"}Appendix{:/tag}
|
|
354
|
+
|
|
355
|
+
## properties
|
|
356
|
+
hide-title
|
|
357
|
+
: true
|
|
358
|
+
|
|
359
|
+
# image:304
|
|
360
|
+
|
|
361
|
+
{:
|
|
362
|
+
align="center"
|
|
363
|
+
relative-height="130"
|
|
364
|
+
relative_margin_top="-10"
|
|
365
|
+
relative_margin_left="0"
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
## properties
|
|
369
|
+
hide-title
|
|
370
|
+
: true
|
|
371
|
+
|
|
372
|
+
# Associations Travel Too
|
|
373
|
+
```ruby
|
|
374
|
+
# in the browser
|
|
375
|
+
comment.post # Post.local.find_by(id: comment.post_id)
|
|
376
|
+
post.comments # Comment.local.where(post_id: post.id)
|
|
377
|
+
comment.user # NoMethodError: user_id is not exposed
|
|
378
|
+
```
|
|
379
|
+
* Nothing is declared in the browser
|
|
380
|
+
* *`post_id`* is exposed, so it travels. *`user_id`* is not
|
|
381
|
+
|
|
382
|
+
# When You Want Off the Convention
|
|
383
|
+
```ruby
|
|
384
|
+
# post "login", to: "sessions#create"
|
|
385
|
+
# get "current_user", to: "sessions#show"
|
|
386
|
+
def session_schema
|
|
387
|
+
render json: Funicular::Schema.build(nil,
|
|
388
|
+
attributes: { ... },
|
|
389
|
+
controller: "sessions", # name the controller
|
|
390
|
+
endpoints: { "current" => "sessions#show" }) # alias a route
|
|
391
|
+
end
|
|
392
|
+
```
|
|
393
|
+
* Convention over Configuration
|
|
394
|
+
* With a way out, as Rails always has
|
|
395
|
+
|
|
396
|
+
# Is It HATEOAS?
|
|
397
|
+
> A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types ...
|
|
398
|
+
> The transitions may be determined (or limited by) the client's knowledge of media types and resource communication mechanisms, both of which may be improved *on-the-fly (e.g., code-on-demand)*.
|
|
399
|
+
|
|
400
|
+
* Not in the strict sense: no links in each response
|
|
401
|
+
* But no URL is hard-coded in the client
|
|
402
|
+
* The server delivers the client and the schema on every load
|
|
403
|
+
|
|
404
|
+
{:.center}
|
|
405
|
+
{::tag name="xx-small"}https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven{:/tag}
|
|
406
|
+
|
|
407
|
+
# Not There Yet
|
|
408
|
+
* Optimistic updates --- a write waits for the server
|
|
409
|
+
* Automatic refresh --- only an explicit fetch for now
|
data/Rakefile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require "rabbit/task/slide"
|
|
2
|
+
|
|
3
|
+
# Edit ./config.yaml to customize meta data
|
|
4
|
+
|
|
5
|
+
spec = nil
|
|
6
|
+
Rabbit::Task::Slide.new do |task|
|
|
7
|
+
spec = task.spec
|
|
8
|
+
# spec.files += Dir.glob("doc/**/*.*")
|
|
9
|
+
# spec.files -= Dir.glob("private/**/*.*")
|
|
10
|
+
# spec.add_runtime_dependency("rabbit-theme-YOUR-THEME")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
desc "Tag #{spec.version}"
|
|
14
|
+
task :tag do
|
|
15
|
+
sh("git", "tag", "-a", spec.version.to_s, "-m", "Publish #{spec.version}")
|
|
16
|
+
sh("git", "push", "--tags")
|
|
17
|
+
end
|
data/config.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: RubyWorldConference2026
|
|
3
|
+
base_name: RESTRebooted
|
|
4
|
+
tags:
|
|
5
|
+
- Rails
|
|
6
|
+
- Funicular
|
|
7
|
+
- REST
|
|
8
|
+
presentation_date: '2026-12-03'
|
|
9
|
+
presentation_start_time:
|
|
10
|
+
presentation_end_time:
|
|
11
|
+
version: 2026.12.03.0
|
|
12
|
+
licenses: ["MIT"]
|
|
13
|
+
slideshare_id:
|
|
14
|
+
speaker_deck_id:
|
|
15
|
+
ustream_id:
|
|
16
|
+
vimeo_id:
|
|
17
|
+
youtube_id:
|
|
18
|
+
author:
|
|
19
|
+
markup_language: :md
|
|
20
|
+
name: HASUMI Hitoshi
|
|
21
|
+
email: hasumikin@gmail.com
|
|
22
|
+
rubygems_user: hasumikin
|
|
23
|
+
slideshare_user:
|
|
24
|
+
speaker_deck_user:
|
data/images/bg-slide.png
ADDED
|
Binary file
|
data/images/bg-title.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Two funicular cars (Rails and Browser) on two tracks share one cable (REST). -->
|
|
3
|
+
<!-- Near track: y = 360 - 0.28 * (x - 80), slope angle 15.64 degrees. -->
|
|
4
|
+
<!-- Far track: the near track shifted up by 30. -->
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="400" viewBox="0 0 1200 400">
|
|
6
|
+
<!-- hillside -->
|
|
7
|
+
<polygon points="0,400 0,356.4 1110,45.6 1145,50 1200,105 1200,400" fill="#1c1c1c"/>
|
|
8
|
+
|
|
9
|
+
<!-- far track (Browser) -->
|
|
10
|
+
<line x1="60" y1="335.6" x2="1110" y2="41.6" stroke="#444444" stroke-width="10" stroke-dasharray="3 22"/>
|
|
11
|
+
<line x1="60" y1="335.6" x2="1110" y2="41.6" stroke="#8a8a8a" stroke-width="3"/>
|
|
12
|
+
|
|
13
|
+
<!-- near track (Rails) -->
|
|
14
|
+
<line x1="60" y1="365.6" x2="1110" y2="71.6" stroke="#555555" stroke-width="12" stroke-dasharray="3 22"/>
|
|
15
|
+
<line x1="60" y1="365.6" x2="1110" y2="71.6" stroke="#a9a7ad" stroke-width="4"/>
|
|
16
|
+
|
|
17
|
+
<!-- lower station -->
|
|
18
|
+
<g fill="none" stroke="#a9a7ad" stroke-width="3">
|
|
19
|
+
<rect x="12" y="320" width="56" height="54"/>
|
|
20
|
+
<polyline points="6,322 40,298 74,322"/>
|
|
21
|
+
</g>
|
|
22
|
+
|
|
23
|
+
<!-- upper station -->
|
|
24
|
+
<g fill="none" stroke="#a9a7ad" stroke-width="3">
|
|
25
|
+
<rect x="1082" y="20" width="90" height="80"/>
|
|
26
|
+
<polyline points="1074,22 1127,0 1180,22"/>
|
|
27
|
+
</g>
|
|
28
|
+
|
|
29
|
+
<!-- the cable: Rails (near) -> horizontal pulley -> Browser (far) -->
|
|
30
|
+
<ellipse cx="1110" cy="48.6" rx="20" ry="13" fill="none" stroke="#00ffc2" stroke-width="1.5" opacity="0.6"/>
|
|
31
|
+
<circle cx="1110" cy="48.6" r="2.5" fill="#00ffc2"/>
|
|
32
|
+
<g fill="none" stroke="#00ffc2" stroke-width="5" stroke-linecap="round">
|
|
33
|
+
<line x1="352.5" y1="273.7" x2="1110" y2="61.6"/>
|
|
34
|
+
<path d="M 1110 61.6 A 20 13 0 0 0 1110 35.6"/>
|
|
35
|
+
<line x1="1110" y1="35.6" x2="897.5" y2="95.1"/>
|
|
36
|
+
</g>
|
|
37
|
+
|
|
38
|
+
<!-- REST label along the cable -->
|
|
39
|
+
<g transform="translate(640,203.2) rotate(-15.64)">
|
|
40
|
+
<text x="0" y="44" text-anchor="middle" font-family="Courier Prime, monospace" font-weight="bold" font-size="34" fill="#00ffc2">REST</text>
|
|
41
|
+
</g>
|
|
42
|
+
|
|
43
|
+
<!-- lower car on the near track: Rails (scaled 1.3 about its track point) -->
|
|
44
|
+
<g transform="translate(255 311) scale(1.3) translate(-255 -311)">
|
|
45
|
+
<circle cx="200" cy="320.4" r="7" fill="#000000" stroke="#a9a7ad" stroke-width="3"/>
|
|
46
|
+
<circle cx="310" cy="289.6" r="7" fill="#000000" stroke="#a9a7ad" stroke-width="3"/>
|
|
47
|
+
<polygon points="180,320 330,278 330,222 180,222" fill="#ff143a"/>
|
|
48
|
+
<g fill="#000000">
|
|
49
|
+
<rect x="192" y="232" width="34" height="22"/>
|
|
50
|
+
<rect x="238" y="232" width="34" height="22"/>
|
|
51
|
+
<rect x="284" y="232" width="34" height="22"/>
|
|
52
|
+
</g>
|
|
53
|
+
<text x="255" y="290" text-anchor="middle" font-family="Space Grotesk, sans-serif" font-weight="bold" font-size="28" fill="#ffffff">Rails</text>
|
|
54
|
+
</g>
|
|
55
|
+
|
|
56
|
+
<!-- upper car on the far track: Browser (moved down the track, scaled 1.3) -->
|
|
57
|
+
<g transform="translate(800 128.4) scale(1.3) translate(-855 -113)">
|
|
58
|
+
<circle cx="800" cy="122.4" r="7" fill="#000000" stroke="#8a8a8a" stroke-width="3"/>
|
|
59
|
+
<circle cx="910" cy="91.6" r="7" fill="#000000" stroke="#8a8a8a" stroke-width="3"/>
|
|
60
|
+
<polygon points="780,122 930,80 930,24 780,24" fill="#00a2ff"/>
|
|
61
|
+
<g fill="#000000">
|
|
62
|
+
<rect x="792" y="34" width="34" height="22"/>
|
|
63
|
+
<rect x="838" y="34" width="34" height="22"/>
|
|
64
|
+
<rect x="884" y="34" width="34" height="22"/>
|
|
65
|
+
</g>
|
|
66
|
+
<text x="855" y="92" text-anchor="middle" font-family="Space Grotesk, sans-serif" font-weight="bold" font-size="28" fill="#ffffff">Browser</text>
|
|
67
|
+
</g>
|
|
68
|
+
</svg>
|
data/images/hasumi.jpg
ADDED
|
Binary file
|
data/images/item24.png
ADDED
|
Binary file
|
data/images/item30.png
ADDED
|
Binary file
|
data/images/item36.png
ADDED
|
Binary file
|
data/images/kou1.png
ADDED
|
Binary file
|
data/images/kou2.png
ADDED
|
Binary file
|
data/images/kou3.png
ADDED
|
Binary file
|
data/images/matz.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/theme.rb
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# puts font_families.sort
|
|
2
|
+
@xxx_large_font_size = screen_size(10 * Pango::SCALE)
|
|
3
|
+
@xx_large_font_size = screen_size(8 * Pango::SCALE)
|
|
4
|
+
@x_large_font_size = screen_size(7 * Pango::SCALE)
|
|
5
|
+
@large_font_size = screen_size(5.5 * Pango::SCALE)
|
|
6
|
+
@normal_font_size = screen_size(4 * Pango::SCALE)
|
|
7
|
+
@small_font_size = screen_size(3.5 * Pango::SCALE)
|
|
8
|
+
@x_small_font_size = screen_size(3 * Pango::SCALE)
|
|
9
|
+
@xx_small_font_size = screen_size(2 * Pango::SCALE)
|
|
10
|
+
|
|
11
|
+
@title_font_family = find_font_family('Space Grotesk')
|
|
12
|
+
@font_family = find_font_family('Space Grotesk')
|
|
13
|
+
@monospace_font_family = 'Courier Prime'
|
|
14
|
+
|
|
15
|
+
# colors
|
|
16
|
+
foreground = "#ff143a"
|
|
17
|
+
red = "#ff143a"
|
|
18
|
+
blue = "#00a2ff"
|
|
19
|
+
black = "#000000"
|
|
20
|
+
white = "#ffffff"
|
|
21
|
+
dark_gray = "#333333"
|
|
22
|
+
light_gray = "#a9a7ad"
|
|
23
|
+
preformatted_foreground = "#00ffc2"
|
|
24
|
+
|
|
25
|
+
@default_headline_line_color = red
|
|
26
|
+
@default_headline_line_width = 2
|
|
27
|
+
@default_headline_line_expand = false
|
|
28
|
+
|
|
29
|
+
@default_emphasis_color = black
|
|
30
|
+
@default_emphasis_level2_color = "#ffffff"
|
|
31
|
+
|
|
32
|
+
set_graffiti_color blue
|
|
33
|
+
set_graffiti_line_width 7
|
|
34
|
+
|
|
35
|
+
#@table_frame_color = "#ffffff"
|
|
36
|
+
#@table_fill_color = "#0f0428"
|
|
37
|
+
#@table_body_frame_color = "#ffffff"
|
|
38
|
+
#@table_body_fill_color = "#3f3468"
|
|
39
|
+
#@table_head_frame_color = "#ffffff"
|
|
40
|
+
#@table_head_fill_color = "#rf0428"
|
|
41
|
+
|
|
42
|
+
@preformatted_fill_color = black
|
|
43
|
+
@preformatted_frame_color = red
|
|
44
|
+
@preformatted_frame_width = 5
|
|
45
|
+
# @preformatted_centering = true
|
|
46
|
+
|
|
47
|
+
@space = screen_y(1)
|
|
48
|
+
|
|
49
|
+
@image_slide_number_start_flag_color = blue
|
|
50
|
+
@image_slide_number_goal_flag_color = red
|
|
51
|
+
|
|
52
|
+
#@slide_headline_hide = true
|
|
53
|
+
|
|
54
|
+
@slide_background_image = 'images/bg-slide.png'
|
|
55
|
+
include_theme("slide-background-image")
|
|
56
|
+
|
|
57
|
+
@title_slide_background_image = 'images/bg-title.png'
|
|
58
|
+
include_theme("title-slide-background-image")
|
|
59
|
+
|
|
60
|
+
include_theme('default')
|
|
61
|
+
|
|
62
|
+
match(Slide, HeadLine) do |heads|
|
|
63
|
+
# heads.hide
|
|
64
|
+
heads.margin_top = 30
|
|
65
|
+
end
|
|
66
|
+
match(Slide) do |slides|
|
|
67
|
+
# slides.horizontal_centering = true
|
|
68
|
+
# slides.margin_left = 100
|
|
69
|
+
# slides.margin_right = 100
|
|
70
|
+
slides.prop_set "foreground", foreground
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
match TitleSlide do |slides|
|
|
74
|
+
slides.prop_set "foreground", foreground
|
|
75
|
+
slides.prop_set "style", "normal"
|
|
76
|
+
end
|
|
77
|
+
match TitleSlide, Title do |title|
|
|
78
|
+
title.margin_top = 10
|
|
79
|
+
title.prop_set "size", screen_size(16.6 * Pango::SCALE)
|
|
80
|
+
title.prop_set "font-family", @title_font_family
|
|
81
|
+
title.prop_set "weight", "bold"
|
|
82
|
+
title.prop_set "foreground", black
|
|
83
|
+
end
|
|
84
|
+
match TitleSlide, Subtitle do |subtitle|
|
|
85
|
+
subtitle.margin_top = -20
|
|
86
|
+
subtitle.prop_set "size", screen_size(8 * Pango::SCALE)
|
|
87
|
+
subtitle.prop_set "font-family", @title_font_family
|
|
88
|
+
subtitle.prop_set "weight", "bold"
|
|
89
|
+
subtitle.prop_set "foreground", black
|
|
90
|
+
end
|
|
91
|
+
match TitleSlide, Author do |author|
|
|
92
|
+
author.margin_top = 100
|
|
93
|
+
author.prop_set "size", @large_font_size
|
|
94
|
+
author.prop_set "foreground", black
|
|
95
|
+
end
|
|
96
|
+
match TitleSlide, ContentSource do |cs|
|
|
97
|
+
cs.margin_top = 70
|
|
98
|
+
cs.prop_set "weight", "bold"
|
|
99
|
+
cs.prop_set "size", screen_size(6.5 * Pango::SCALE)
|
|
100
|
+
cs.prop_set "foreground", black
|
|
101
|
+
end
|
|
102
|
+
match TitleSlide, Place do |place|
|
|
103
|
+
place.margin_top = 20
|
|
104
|
+
place.prop_set "size", @x_small_font_size
|
|
105
|
+
place.prop_set "foreground", black
|
|
106
|
+
end
|
|
107
|
+
match TitleSlide, Date do |date|
|
|
108
|
+
date.margin_top = 10
|
|
109
|
+
date.prop_set "size", @x_small_font_size
|
|
110
|
+
date.prop_set "foreground", black
|
|
111
|
+
end
|
|
112
|
+
match TitleSlide, Institution do |i|
|
|
113
|
+
i.prop_set "size", @x_small_font_size
|
|
114
|
+
i.prop_set "foreground", black
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
#@slide_logo_image = 'images/mark_g.png'
|
|
118
|
+
#include_theme('slide-logo')
|
|
119
|
+
|
|
120
|
+
@item_image_1 = 'images/item36.png'
|
|
121
|
+
@item_image_2 = 'images/item30.png'
|
|
122
|
+
@item_image_3 = 'images/item24.png'
|
|
123
|
+
|
|
124
|
+
include_theme("default-item-mark")
|
|
125
|
+
|
|
126
|
+
slide_body = [Slide, Body]
|
|
127
|
+
item_list_item = [ItemList, ItemListItem]
|
|
128
|
+
|
|
129
|
+
indent = 50
|
|
130
|
+
|
|
131
|
+
match(*(slide_body + (item_list_item * 1))) do |items|
|
|
132
|
+
name = "item1"
|
|
133
|
+
items.delete_pre_draw_proc_by_name(name)
|
|
134
|
+
items.delete_post_draw_proc_by_name(name)
|
|
135
|
+
draw_image_mark(items, @item_image_1, name, indent: indent)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
match(*(slide_body + (item_list_item * 2))) do |items|
|
|
139
|
+
name = "item2"
|
|
140
|
+
items.delete_pre_draw_proc_by_name(name)
|
|
141
|
+
items.delete_post_draw_proc_by_name(name)
|
|
142
|
+
draw_image_mark(items, @item_image_2, name, indent: indent)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
match(*(slide_body + (item_list_item * 3))) do |items|
|
|
146
|
+
name = "item3"
|
|
147
|
+
items.delete_pre_draw_proc_by_name(name)
|
|
148
|
+
items.delete_post_draw_proc_by_name(name)
|
|
149
|
+
draw_image_mark(items, @item_image_3, name, indent: indent)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
enum_list_item = [EnumList, EnumListItem]
|
|
153
|
+
|
|
154
|
+
match(*(slide_body + enum_list_item + item_list_item)) do |items|
|
|
155
|
+
name = "enum-item1"
|
|
156
|
+
items.delete_pre_draw_proc_by_name(name)
|
|
157
|
+
items.delete_post_draw_proc_by_name(name)
|
|
158
|
+
draw_image_mark(items, @item_image_1, name, indent: indent)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
match(*(slide_body + enum_list_item + (item_list_item * 2))) do |items|
|
|
162
|
+
name = "enum-item2"
|
|
163
|
+
items.delete_pre_draw_proc_by_name(name)
|
|
164
|
+
items.delete_post_draw_proc_by_name(name)
|
|
165
|
+
draw_image_mark(items, @item_image_2, name, indent: indent)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# table
|
|
169
|
+
all_table = ["**", Table]
|
|
170
|
+
match(*(all_table + [TableBody, TableRow, TableCell])) do |cells|
|
|
171
|
+
set_font_family(cells, @monospace_font_family)
|
|
172
|
+
end
|
|
173
|
+
match(*(all_table + [TableHead, TableRow, TableHeader])) do |headers|
|
|
174
|
+
set_font_family(headers, @monospace_font_family)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
match("**", Emphasis) do |texts|
|
|
178
|
+
texts.prop_set("weight", "bold")
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Chapter
|
|
182
|
+
match Slide do |slides|
|
|
183
|
+
slides.each do |slide|
|
|
184
|
+
if slide.match?(/sub_chapter/)
|
|
185
|
+
slide.horizontal_centering = true
|
|
186
|
+
elsif slide.match?(/chapter/)
|
|
187
|
+
slide.margin_top = -10
|
|
188
|
+
set_font_family slide, @title_font_family
|
|
189
|
+
slide.horizontal_centering = true
|
|
190
|
+
elsif slide.match?(/cite/)
|
|
191
|
+
slide.prop_set "foreground", foreground
|
|
192
|
+
slide.horizontal_centering = true
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
match("**", PreformattedBlock) do |block|
|
|
198
|
+
# assume console
|
|
199
|
+
block.prop_set("foreground", preformatted_foreground)
|
|
200
|
+
# block.prop_set("background", dark_gray)
|
|
201
|
+
end
|
|
202
|
+
# ↑↓ the order matters
|
|
203
|
+
match("**", SyntaxHighlightingBlock) do |block|
|
|
204
|
+
# assume ruby
|
|
205
|
+
block.prop_set("foreground", black)
|
|
206
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rabbit-slide-hasumikin-RubyWorldConference2026
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 2026.12.03.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- HASUMI Hitoshi
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 2026-12-03 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rabbit
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: 2.0.2
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: 2.0.2
|
|
26
|
+
description: Presentation slide for RubyWorld Conference 2026
|
|
27
|
+
email:
|
|
28
|
+
- hasumikin@gmail.com
|
|
29
|
+
executables: []
|
|
30
|
+
extensions: []
|
|
31
|
+
extra_rdoc_files: []
|
|
32
|
+
files:
|
|
33
|
+
- ".rabbit"
|
|
34
|
+
- README.md
|
|
35
|
+
- REST Rebooted - What Funicular on Rails Carries.pdf
|
|
36
|
+
- RESTRebooted.md
|
|
37
|
+
- Rakefile
|
|
38
|
+
- config.yaml
|
|
39
|
+
- images/bg-slide.png
|
|
40
|
+
- images/bg-title.png
|
|
41
|
+
- images/bugs22082.png
|
|
42
|
+
- images/bugs22118.png
|
|
43
|
+
- images/funicolare.jpg
|
|
44
|
+
- images/funicular-rest.svg
|
|
45
|
+
- images/hasumi.jpg
|
|
46
|
+
- images/item24.png
|
|
47
|
+
- images/item30.png
|
|
48
|
+
- images/item36.png
|
|
49
|
+
- images/kou1.png
|
|
50
|
+
- images/kou2.png
|
|
51
|
+
- images/kou3.png
|
|
52
|
+
- images/matz.png
|
|
53
|
+
- images/network-304.png
|
|
54
|
+
- pdf/RubyWorldConference2026-RESTRebooted.pdf
|
|
55
|
+
- theme.rb
|
|
56
|
+
homepage: https://slide.rabbit-shocker.org/authors/hasumikin/RubyWorldConference2026/
|
|
57
|
+
licenses:
|
|
58
|
+
- MIT
|
|
59
|
+
metadata:
|
|
60
|
+
markup_language: md
|
|
61
|
+
rdoc_options: []
|
|
62
|
+
require_paths:
|
|
63
|
+
- lib
|
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
|
+
requirements:
|
|
71
|
+
- - ">="
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '0'
|
|
74
|
+
requirements: []
|
|
75
|
+
rubygems_version: 4.0.20
|
|
76
|
+
specification_version: 4
|
|
77
|
+
summary: 'REST Rebooted: What Funicular on Rails Carries'
|
|
78
|
+
test_files: []
|