rabbit-slide-unasuke-tokyorubykaigi12 1.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: faf17abf27b25a739274b7e4d4782c197a8709db15f9a95a4bfb90d8687d6dbe
4
+ data.tar.gz: 437f164b32a0b089ea8aa06bc6a27b23f8722124e28972f086e3f35549c6c532
5
+ SHA512:
6
+ metadata.gz: 76a2dee885d7d8c2995e81feed0a5f8f03c0521c781b5177ede4c951b6b1684b8211688c327de69f2392b90e8c5bd6c57327a8cb9a77266e2cc230d68fe5c588
7
+ data.tar.gz: 7d70c173520aeeb81182b55b7f7a97ab7245687f12d22e3446f013c8857465f4714c91529976e2fbe914f085d1a6f1d952c70a5a9b270e6bbf0da7b5fab2722e
data/.rabbit ADDED
@@ -0,0 +1,2 @@
1
+ --size 1920,1080
2
+ slide.md
data/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # TokyoRubyKaigi12
2
+
3
+ * <https://regional.rubykaigi.org/tokyo12/>
4
+ * <https://connpass.com/event/339170/>
5
+
6
+ ## 作者向け
7
+
8
+ ### 表示
9
+
10
+ rake
11
+
12
+ ### 公開
13
+
14
+ rake publish
15
+
16
+ ## 閲覧者向け
17
+
18
+ ### インストール
19
+
20
+ gem install rabbit-slide-unasuke-tokyorubykaigi12
21
+
22
+ ### 表示
23
+
24
+ rabbit rabbit-slide-unasuke-tokyorubykaigi12.gem
25
+
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,27 @@
1
+ ---
2
+ id: tokyorubykaigi12
3
+ base_name: slide
4
+ tags: [
5
+ "rails",
6
+ "ruby",
7
+ "tokyorubykaigi12",
8
+ ]
9
+ presentation_date: 2025-01-17
10
+ presentation_start_time:
11
+ presentation_end_time:
12
+ version: 1.0.0
13
+ licenses: ["MIT"]
14
+ slideshare_id:
15
+ speaker_deck_id:
16
+ vimeo_id:
17
+ youtube_id:
18
+ width: 1920
19
+ height: 1080
20
+ source_code_uri: https://github.com/unasuke/tokyorubykaigi12
21
+ author:
22
+ markup_language: :markdown
23
+ name: unasuke
24
+ email: yusuke1994525@gmail.com
25
+ rubygems_user: unasuke
26
+ slideshare_user:
27
+ speaker_deck_user:
Binary file
Binary file
Binary file
Binary file
Binary file
data/img/icon.jpg ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/slide.md ADDED
@@ -0,0 +1,286 @@
1
+ # Diff of the conference-app from 2023 to 2024
2
+
3
+ author
4
+ : unasuke
5
+
6
+ content-source
7
+ : 東京Ruby会議12 前夜祭
8
+
9
+ date
10
+ : 2025-01-17
11
+
12
+ theme
13
+ : theme
14
+
15
+ # 自己紹介
16
+
17
+ * Name: うなすけ
18
+ * Work: フリーランス
19
+ * Kaigi on Rails organizer
20
+ * {::tag name='x-small'}GitHub <https://github.com/unasuke>{:/tag}
21
+ * {::tag name='x-small'}Fediverse <https://mstdn.unasuke.com/@unasuke>{:/tag}
22
+ * {::tag name='x-small'}X (Twitter) <https://twitter.com/yu_suke1994>{:/tag}
23
+ * {::tag name='x-small'}<https://unasuke.com>{:/tag}
24
+
25
+ ![](img/icon.jpg){:relative_width='24' align='right' relative_margin_right='-8' relative_margin_top='20'}
26
+
27
+ # さっきのワークショップで書いたコード
28
+ ```ruby
29
+ CANVAS_SIZE = 800
30
+ DRAW_COUNT = 0
31
+
32
+ class Circle
33
+ def initialize
34
+ @x = rand(0..CANVAS_SIZE)
35
+ @y = rand(0..CANVAS_SIZE)
36
+ loop do
37
+ @speed = rand(-10.0..10.0)
38
+ break if abs(@speed) > 2.0
39
+ end
40
+ @angle = rand(0..Math::PI)
41
+ @timing = [10, 20, 30, 40, 50].shuffle.first
42
+ end
43
+
44
+ def next_position(count)
45
+ if count % @timing == 0
46
+ @angle = rand(0..(Math::PI*2))
47
+ end
48
+
49
+ @x = @x + cos(@angle) * @speed
50
+ @y = @y + sin(@angle) * @speed
51
+ if @x >= CANVAS_SIZE || @y >= CANVAS_SIZE
52
+ @angle += Math::PI
53
+ end
54
+ end
55
+
56
+ def draw(count)
57
+ next_position(count)
58
+ fill("#0077B6")
59
+ ellipse(@x, @y, 50, 50)
60
+
61
+ end
62
+ end
63
+
64
+
65
+ def setup
66
+ createCanvas(CANVAS_SIZE, CANVAS_SIZE)
67
+ background("#CAF0F8")
68
+
69
+ # noLoop
70
+ @circles = 100.times.map { Circle.new }
71
+ @draw_count = 0
72
+ end
73
+
74
+ def draw
75
+ noStroke
76
+ grid_size = 30
77
+ background("#CAF0F8")
78
+ @circles.each {|c| c.draw(@draw_count) }
79
+ @draw_count += 1
80
+ end
81
+ ```
82
+
83
+ # 東京Ruby会議12では「Rubyと暮らす」発表をけっこう幅広く募集しています!!!!!!!!!!!!(いました)
84
+
85
+ ![](img/tokyorubykaigi12-cfp-theme.png){:relative_width='90' align='center'}
86
+
87
+ # https://note.com/tokyorubykaigi12/n/n14803ce700dd
88
+
89
+ > 「Rubyと暮らす」
90
+ >
91
+ > 東京Ruby会議12がめざす方向性をあえて一言で示すならば、こうなるでしょうか。Rubyを日々書いて暮らす、あなたの話を聞きたいです! 小粒なものでも、大掛かりなものでも、どちらも歓迎です。
92
+
93
+ <https://note.com/tokyorubykaigi12/n/n14803ce700dd> より
94
+
95
+ # 「暮らし」
96
+ * カンファレンス(コミュニティ)は暮らしの一部
97
+ * ですよね?
98
+
99
+ # 「暮らし」
100
+ * カンファレンス(コミュニティ)は暮らしの一部
101
+ * ですよね?
102
+ * 特に運営メンバーともなると、暮らしですよね?
103
+
104
+ # Kaigi on Railsは暮らし、そういうことにします
105
+
106
+ {::tag name='center'}
107
+ {::tag name='x-large'}というわけで暮らしの話をします{:/tag}
108
+ {:/tag}
109
+
110
+ # Kaigi on Rails 2024
111
+ * 参加していただけましたか?
112
+ * 楽しんでもらえましたか?
113
+
114
+ # Kaigi on Rails conference-app
115
+ * <https://app.kaigionrails.org>
116
+ * <https://github.com/kaigionrails/conference-app>
117
+
118
+ # それはとあるafter eventでの出来事であった
119
+
120
+ {::tag name='center'}
121
+ {::tag name='x-large'}「へ〜、そんなアプリがあったんですね」{:/tag}
122
+ {:/tag}
123
+
124
+ # 2025年の抱負
125
+ 2025年はもっとconference-appを宣伝する年にします
126
+
127
+ # Diff of the conference-app from 2023 to 2024
128
+
129
+ 1. DB移行
130
+ 2. Redis移行
131
+ 3. Heroku脱出
132
+ 4. Rails 8移行
133
+ 5. Solid Queue移行
134
+
135
+ # 2024、一番やりたかったこと
136
+ Heroku脱出!
137
+
138
+
139
+ ![](img/kaigionrails-esa-248-heroku-exodus.png){:relative_width='85' :align='center'}
140
+
141
+ # Why 脱Heroku?
142
+ * ログインセッションが短い
143
+ * インスタンスがUSにある
144
+ * HTTP/1.1しかサポートされていない
145
+ * {::tag name='x-small'}※ 2024-11-21にHTTP/2がGAになりました{:/tag}
146
+ * {::tag name='x-small'}<https://devcenter.heroku.com/changelog-items/3066>{:/tag}
147
+
148
+ # どうすれば脱Herokuできるのか?
149
+ * 小さいマネージドのPostgreSQLがあって
150
+ * 小さいマネージドのRedisがあって
151
+ * アクセスのない時はインスタンスを止めてくれて
152
+
153
+ そんなPaaS、IaaSがあればなあ……
154
+
155
+ # 移行先のPaaS候補
156
+ * Render.com
157
+ * <https://render.com>
158
+ * Fly.io
159
+ * <https://fly.io>
160
+
161
+ # 結局AWSに移行しました
162
+ * AWS App Runnerがある
163
+ * Google CloudでいうCloud Run的な
164
+ * RubyKaigi側で使っているAWSアカウントを親にできる
165
+ * (thanks sorah)
166
+ * GitHubアカウントでOIDCできる (thanks sorah)
167
+ * <https://speakerdeck.com/sorah/serverless-idp-for-small-team-himari>
168
+ * 実はRubyKaigiのsponsor-appがApp Runnerに移行している
169
+
170
+ # AWS移行、DBとRedisはどうするの?
171
+ * ElastiCache Serverlessはあるけど……
172
+ * Aurora Serverlessは最小を0にできないし(最小は0.5 ACU)
173
+ * (後述)
174
+
175
+ 1年で1週間くらいしか稼動しないのにずっとリソース確保しっぱなしはしたくない!
176
+
177
+ # Serverless Postgres
178
+ * Neon
179
+ * <https://neon.tech>
180
+ * Nile
181
+ * <https://www.thenile.dev>
182
+
183
+ これならDBにアクセスしている時間のみの課金にできる!
184
+
185
+ # ヨッシャ移行するぞ
186
+
187
+ ![](img/app-migration-log-1.png){:relative_width='70' :align='center'}
188
+
189
+ # ヨッシャ移行するぞ
190
+
191
+ ![](img/app-migration-log-2.png){:relative_width='85' :align='center'}
192
+
193
+ # ヨッシャ
194
+ ![](img/conference-app-app-runner-tf.png){:relative_width='60' :align='center'}
195
+
196
+ <https://github.com/kaigionrails/terraform/pull/4>
197
+
198
+
199
+ # Diff of the conference-app from 2023 to 2024
200
+
201
+ 1. DB移行
202
+ 2. Redis移行
203
+ 3. Heroku脱出 ← ココまで終わり
204
+ 4. Rails 8移行
205
+ 5. Solid Queue移行
206
+
207
+ # Rails 8移行
208
+ Rails 8 beta1 2024-09-27 released
209
+
210
+ ![](img/rails8-beta1-release.png){:relative_width='75'}
211
+
212
+ ところでKaigi on Rails 2024は10/25
213
+
214
+ # Rails 8 upgrade
215
+
216
+ conference-appの場合、以下の順でupdateをした
217
+
218
+ 1. v7.1.3.4
219
+ 2. v7.2.1
220
+ 2. v8.0.0.beta1
221
+ 3. v8.0.0.rc1 (Kaigi on Rails 2024開催中はここ)
222
+ 3. v8.0.0.rc2 (10/30 released)
223
+ 3. v8.0.0 (11/07 released)
224
+
225
+ # Is rails 8 upgrade hard?
226
+ <https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-7-2-to-rails-8-0>
227
+
228
+ ![](img/railsguides-rails8-update.png){:relative_width='60'}
229
+
230
+ 全然長くない!
231
+
232
+ # Diff of the conference-app from 2023 to 2024
233
+
234
+ 1. DB移行
235
+ 2. Redis移行
236
+ 3. Heroku脱出
237
+ 4. Rails 8移行 ← ココまで話した
238
+ 5. Solid Queue移行
239
+
240
+ # Solid Queue移行
241
+ ![](img/conference-app-solid-queue.png){:relative_width='100' :align='center'}
242
+
243
+ やるだけ
244
+
245
+ (デカいdiffの大半はmigrationとrbsです)
246
+
247
+ # 現在の構成
248
+
249
+ ![](img/conference-app-infra-2024.png){:relative_width="70"}
250
+
251
+ # Why 脱Heroku?
252
+ * ログインセッションが短い
253
+ * **インスタンスがUSにある**
254
+ * HTTP/1.1しかサポートされていない
255
+ * {::tag name='x-small'}※ 2024-11-21にHTTP/2がGAになりました{:/tag}
256
+ * {::tag name='x-small'}<https://devcenter.heroku.com/changelog-items/3066>{:/tag}
257
+
258
+
259
+ # 結局オレゴン(アメリカ)やん!
260
+ * はい……
261
+
262
+ # 2024-11-20 Amazon Aurora Serverless v2 update
263
+ Amazon Aurora Serverless v2 がゼロキャパシティへのスケーリングをサポート
264
+
265
+ > Amazon Aurora Serverless v2 では、0 個の Aurora 容量ユニット (ACU) へのスケーリングがサポートされるようになりました。このリリースにより、データベース接続に基づいて非アクティブ状態が一定期間続くと、データベースを自動的に一時停止できます。最初の接続が要求されると、データベースは自動的に再開し、アプリケーションの要求に合わせてスケールします。Aurora Serverless v2 は ACU 単位で容量を計算します。1 つの ACU は、約 2 ギビバイト (GiB) のメモリ、対応する CPU、およびネットワークから構成されます。容量範囲を指定すると、データベースはアプリケーションのニーズに合わせてこの範囲内でスケーリングされます。
266
+
267
+ <https://aws.amazon.com/jp/about-aws/whats-new/2024/11/amazon-aurora-serverless-v2-scaling-zero-capacity/>
268
+
269
+ # つまり……?
270
+ 全てがap-northeast-1になる時代
271
+
272
+ # 要は?
273
+ * Kaigi on Rails 2025でもconference-appを使う予定です!
274
+ * ポートフォリオ置き場にAWSという選択はいかが?
275
+ * 無理があるのではないか?
276
+
277
+ # たすきを渡す
278
+ ![](img/kaigionrails-2024-sinage.jpg){:relative_width='80' :align='center'}
279
+
280
+ # たすきを渡す
281
+ ![](img/conference-app-signage.png){:relative_width='76' :align='center'}
282
+
283
+ <https://github.com/kaigionrails/conference-app/pull/323>
284
+
285
+ # たすきを渡す
286
+ ![](img/tokyorubykaigi-okuramasafumi.png){:relative_width='100' :align='center'}
data/theme.rb ADDED
@@ -0,0 +1,113 @@
1
+ @default_foreground ||= @foreground
2
+ @default_background ||= @background
3
+ @default_shadow_color ||= @shadow_color
4
+
5
+ # pp font_families
6
+ font_color = '#333'
7
+ @default_font = 'BIZ UDPGothic'
8
+ @font_family = find_font_family(@default_font)
9
+ @bold_font = @default_font
10
+ @bold_font_family = find_font_family(@bold_font)
11
+ @monospace_font = 'Cica'
12
+ @monospace_font_family = find_font_family(@monospace_font)
13
+
14
+ @xxxx_large_font_size = screen_size(10 * Pango::SCALE)
15
+ @xxx_large_font_size = screen_size(8 * Pango::SCALE)
16
+ @xx_large_font_size = screen_size(6 * Pango::SCALE)
17
+ @x_large_font_size = screen_size(4.5 * Pango::SCALE)
18
+ @large_font_size = screen_size(4 * Pango::SCALE)
19
+ @normal_font_size = screen_size(3.5 * Pango::SCALE)
20
+ @small_font_size = screen_size(3.2 * Pango::SCALE)
21
+ @x_small_font_size = screen_size(3 * Pango::SCALE)
22
+ @xx_small_font_size = screen_size(2.8 * Pango::SCALE)
23
+ @xxx_small_font_size = screen_size(2.5 * Pango::SCALE)
24
+ @script_font_size = @x_small_font_size
25
+ @large_script_font_size = @small_font_size
26
+ @x_large_script_font_size = @large_font_size
27
+ @title_slide_title_font_size = @xxx_large_font_size
28
+
29
+ @block_quote_fill_color = "#f8f8f8"
30
+ @preformatted_fill_color = "#f8f8f8"
31
+ @default_headline_line_color = font_color
32
+
33
+ # @title_slide_background_image = 'img/title_bg.png'
34
+ # @slide_background_image = 'img/bg.png'
35
+
36
+ # set_foreground(@default_foreground)
37
+ # set_background(@default_background)
38
+
39
+ add_image_path("ruby-images")
40
+ include_theme("default-icon")
41
+ # include_theme("default-title-text")
42
+ include_theme("default-text")
43
+ include_theme("default-title-slide")
44
+ include_theme("default-slide")
45
+ include_theme("default-item-mark")
46
+ include_theme("default-method-list")
47
+ include_theme("default-preformatted")
48
+ include_theme("default-block-quote")
49
+ include_theme("default-foot-text")
50
+ include_theme("default-description")
51
+ include_theme("image")
52
+ include_theme("table")
53
+ include_theme("newline-in-slides")
54
+ include_theme("per-slide-background-color")
55
+ include_theme("background-image-toolkit")
56
+ include_theme("per-slide-background-image")
57
+ include_theme("body-background-image")
58
+ include_theme("tag")
59
+ include_theme("syntax-highlighting")
60
+ include_theme("default-comment")
61
+
62
+ include_theme("title-slide-background-image")
63
+ include_theme("slide-background-image")
64
+
65
+ match(TitleSlide, "*") do |elems|
66
+ elems.horizontal_centering = true
67
+ elems.prop_set("size", @large_font_size)
68
+ set_font_family(elems)
69
+ end
70
+
71
+ match(TitleSlide, Title) do |titles|
72
+ titles.prop_set("size", @title_slide_title_font_size)
73
+ titles.padding_bottom = @space * 2
74
+ titles.prop_set("weight", "SemiBold")
75
+ end
76
+
77
+ match(Slide, HeadLine) do |heads|
78
+ heads.prop_set("size", @large_font_size)
79
+ heads.prop_set("weight", "bold")
80
+ end
81
+
82
+ match(TitleSlide) do |slides|
83
+ # slides.margin_left = 900
84
+ slides.vertical_centering = true
85
+ slides.prop_set "foreground", font_color
86
+ slides.prop_set("weight", "bold")
87
+ end
88
+ match(TitleSlide, Subtitle) do |subtitle|
89
+ subtitle.margin_top = -20
90
+ subtitle.prop_set("size", @large_font_size)
91
+ end
92
+ match(TitleSlide, Author) do |author|
93
+ author.margin_top = 50
94
+ author.prop_set("size", @large_font_size)
95
+ author.prop_set("weight", "normal")
96
+ end
97
+ match(TitleSlide, Place) do |place|
98
+ place.prop_set("size", @small_font_size)
99
+ end
100
+ match(TitleSlide, "*") do |elems|
101
+ elems.horizontal_centering = true
102
+ end
103
+
104
+ match(TitleSlide, Date) do |dates|
105
+ dates.prop_set("size", @small_font_size)
106
+ # dates.prop_set("style", "italic")
107
+ end
108
+
109
+ match(TitleSlide, ContentSource) do |sources|
110
+ sources.prop_set("size", @small_font_size)
111
+ sources.margin_bottom = @space
112
+ # sources.prop_set("style", "italic")
113
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rabbit-slide-unasuke-tokyorubykaigi12
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - unasuke
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2025-01-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rabbit
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.2
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.0.2
27
+ description: |-
28
+ * <https://regional.rubykaigi.org/tokyo12/>
29
+ * <https://connpass.com/event/339170/>
30
+ email:
31
+ - yusuke1994525@gmail.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - ".rabbit"
37
+ - README.md
38
+ - Rakefile
39
+ - config.yaml
40
+ - img/app-migration-log-1.png
41
+ - img/app-migration-log-2.png
42
+ - img/conference-app-app-runner-tf.png
43
+ - img/conference-app-infra-2024.png
44
+ - img/conference-app-signage.png
45
+ - img/conference-app-solid-queue.png
46
+ - img/icon.jpg
47
+ - img/kaigionrails-2024-sinage.jpg
48
+ - img/kaigionrails-esa-248-heroku-exodus.png
49
+ - img/rails8-beta1-release.png
50
+ - img/railsguides-rails8-update.png
51
+ - img/tokyorubykaigi-okuramasafumi.png
52
+ - img/tokyorubykaigi12-cfp-theme.png
53
+ - pdf/tokyorubykaigi12-slide.pdf
54
+ - slide.md
55
+ - theme.rb
56
+ homepage: https://slide.rabbit-shocker.org/authors/unasuke/tokyorubykaigi12/
57
+ licenses:
58
+ - MIT
59
+ metadata:
60
+ source_code_uri: https://github.com/unasuke/tokyorubykaigi12
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.4.6
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: TokyoRubyKaigi12
80
+ test_files: []