diff --git a/Gemfile b/Gemfile index 99d432f0b..8d4f9874a 100644 --- a/Gemfile +++ b/Gemfile @@ -100,11 +100,8 @@ gem "meilisearch-rails" gem "ahoy_matey", "~> 4.2" gem "vite_rails" gem "meta-tags", "~> 2.18" - gem "groupdate", "~> 6.2" - gem "appsignal", "~> 3.4" - gem "chartkick", "~> 5.0" gem "rails_autolink", "~> 1.1" @@ -126,3 +123,4 @@ gem "ruby-openai" gem "json-repair", "~> 0.2.0" gem "redcarpet", "~> 3.6" +gem "country_select", "~> 8.0" diff --git a/Gemfile.lock b/Gemfile.lock index 7a0d39fcb..2f3298970 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -115,10 +115,11 @@ GEM chartkick (5.0.7) concurrent-ruby (1.3.3) connection_pool (2.4.1) - countries (6.0.1) + countries (5.7.2) unaccent (~> 0.3) - crack (1.0.0) - bigdecimal + country_select (8.0.3) + countries (~> 5.0) + crack (0.4.5) rexml crass (1.0.6) date (3.3.4) @@ -177,15 +178,9 @@ GEM raabro (~> 1.4) globalid (1.2.1) activesupport (>= 6.1) - google-protobuf (4.27.2-aarch64-linux) - bigdecimal - rake (>= 13) google-protobuf (4.27.2-arm64-darwin) bigdecimal rake (>= 13) - google-protobuf (4.27.2-x86_64-darwin) - bigdecimal - rake (>= 13) google-protobuf (4.27.2-x86_64-linux) bigdecimal rake (>= 13) @@ -215,15 +210,9 @@ GEM json-repair (0.2.0) language_server-protocol (3.17.0.3) lint_roller (1.1.0) - litestream (0.10.4) - logfmt (>= 0.0.10) - sqlite3 litestream (0.10.4-arm64-darwin) logfmt (>= 0.0.10) sqlite3 - litestream (0.10.4-x86_64-darwin) - logfmt (>= 0.0.10) - sqlite3 litestream (0.10.4-x86_64-linux) logfmt (>= 0.0.10) sqlite3 @@ -269,12 +258,8 @@ GEM net-smtp (0.5.0) net-protocol nio4r (2.7.3) - nokogiri (1.16.6-aarch64-linux) - racc (~> 1.4) nokogiri (1.16.6-arm64-darwin) racc (~> 1.4) - nokogiri (1.16.6-x86_64-darwin) - racc (~> 1.4) nokogiri (1.16.6-x86_64-linux) racc (~> 1.4) pagy (6.5.0) @@ -406,9 +391,7 @@ GEM fugit (~> 1.11.0) railties (>= 7.1) sorbet-runtime (0.5.11475) - sqlite3 (2.0.2-aarch64-linux-gnu) sqlite3 (2.0.2-arm64-darwin) - sqlite3 (2.0.2-x86_64-darwin) sqlite3 (2.0.2-x86_64-linux-gnu) standard (1.39.1) language_server-protocol (~> 3.17.0.2) @@ -437,8 +420,8 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unaccent (0.4.0) - unicode-display_width (2.5.0) - uri (0.13.0) + unicode-display_width (2.4.2) + uri (0.12.2) useragent (0.16.10) vcr (6.2.0) view_component (3.12.1) @@ -471,11 +454,7 @@ GEM zeitwerk (2.6.16) PLATFORMS - aarch64-linux - arm64-darwin-22 arm64-darwin-23 - x86_64-darwin-19 - x86_64-darwin-23 x86_64-linux DEPENDENCIES @@ -491,6 +470,7 @@ DEPENDENCIES capybara chartkick (~> 5.0) countries + country_select (~> 8.0) debug dockerfile-rails (>= 1.2) dotenv-rails diff --git a/app/clients/youtube/playlists.rb b/app/clients/youtube/playlists.rb index c20671570..a1dfe35c8 100644 --- a/app/clients/youtube/playlists.rb +++ b/app/clients/youtube/playlists.rb @@ -1,5 +1,6 @@ module Youtube class Playlists < Youtube::Client + DEFAULT_METADATA_PARSER = "Youtube::VideoMetadata" def all(channel_id:, title_matcher: nil) items = all_items("/playlists", query: {channelId: channel_id, part: "snippet,contentDetails"}).map do |metadata| OpenStruct.new({ @@ -10,6 +11,7 @@ def all(channel_id:, title_matcher: nil) channel_id: metadata.snippet.channelId, year: metadata.snippet.title.match(/\d{4}/).to_s.presence || DateTime.parse(metadata.snippet.publishedAt).year, videos_count: metadata.contentDetails.itemCount, + metadata_parser: DEFAULT_METADATA_PARSER, slug: metadata.snippet.title.parameterize }) end diff --git a/app/models/event.rb b/app/models/event.rb index 31b2d0e05..a08ccca6c 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -26,4 +26,6 @@ class Event < ApplicationRecord # validations validates :name, presence: true + VALID_COUNTRY_CODES = ISO3166::Country.codes + validates :country_code, inclusion: {in: VALID_COUNTRY_CODES}, allow_nil: true end diff --git a/app/models/youtube/video_metadata.rb b/app/models/youtube/video_metadata.rb new file mode 100644 index 000000000..d1b27171f --- /dev/null +++ b/app/models/youtube/video_metadata.rb @@ -0,0 +1,92 @@ +# require "active_support/core_ext/hash/keys" + +# This class is used to extract the metadata from a youtube video +# it will try to: +# - extract the speakers from the title +# - remove the event_name from the title to make less redondant +# - remove leading separators from the title +module Youtube + class VideoMetadata + SPEAKERS_SECTION_SEPARATOR = " by " + SEPARATOR_IN_BETWEEN_SPEAKERS = / & |, | and / + + def initialize(metadata:, event_name:, options: {}) + @metadata = metadata + @event_name = event_name + end + + def cleaned + OpenStruct.new( + { + title: title, + raw_title: raw_title, + speakers: speakers, + event_name: @event_name, + published_at: @metadata.published_at, + description: description, + video_id: @metadata.video_id + } + ) + end + + def keynote? + title_without_event_name.match(/keynote/i) + end + + def lighting? + title_without_event_name.match(/lightning talks/i) + end + + private + + def extract_info_from_title + title_parts = title_without_event_name.split(SPEAKERS_SECTION_SEPARATOR) + speakers = title_parts.last.split(SEPARATOR_IN_BETWEEN_SPEAKERS).map(&:strip) + title = title_parts[0..-2].join(SPEAKERS_SECTION_SEPARATOR).gsub(/^\s*-/, "").strip + + { + title: keynote? ? remove_leading_and_trailing_separators_from(title_without_event_name) : remove_leading_and_trailing_separators_from(title), + speakers: speakers + } + end + + def speakers + return [] if lighting? + + title_parts = title_without_event_name.split(SPEAKERS_SECTION_SEPARATOR) + title_parts.last.split(SEPARATOR_IN_BETWEEN_SPEAKERS).map(&:strip) + end + + def raw_title + @metadata.title + end + + def title_without_event_name + # RubyConf AU 2013: From Stubbies to Longnecks by Geoffrey Giesemann + # will return "From Stubbies to Longnecks by Geoffrey Giesemann" + remove_leading_and_trailing_separators_from(raw_title.gsub(@event_name, "").gsub(/\s+/, " ")) + end + + ## remove : - and other separators from the title + def remove_leading_and_trailing_separators_from(title) + title.gsub(/^[-:]?/, "").strip.then do |title| + title.gsub(/[-:,]$/, "").strip + end + end + + def title + if keynote? || lighting? + # when it is a keynote or lighting, usually we want to keep the full title without the event name + remove_leading_and_trailing_separators_from(title_without_event_name) + else + title_parts = title_without_event_name.split(SPEAKERS_SECTION_SEPARATOR) + title = title_parts[0..-2].join(SPEAKERS_SECTION_SEPARATOR).gsub(/^\s*-/, "").strip + remove_leading_and_trailing_separators_from(title) + end + end + + def description + @metadata.description + end + end +end diff --git a/app/models/youtube/video_metadata_rails_world.rb b/app/models/youtube/video_metadata_rails_world.rb new file mode 100644 index 000000000..20593927b --- /dev/null +++ b/app/models/youtube/video_metadata_rails_world.rb @@ -0,0 +1,84 @@ +# require "active_support/core_ext/hash/keys" + +# This class is used to extract the metadata from a youtube video +# it will try to: +# - extract the speakers from the title +# - remove the event_name from the title to make less redondant +# - remove leading separators from the title +module Youtube + class VideoMetadataRailsWorld + SPEAKERS_SECTION_SEPARATOR = " - " + SEPARATOR_IN_BETWEEN_SPEAKERS = / & |, | and / + + def initialize(metadata:, event_name:, options: {}) + @metadata = metadata + @event_name = event_name + end + + def cleaned + OpenStruct.new( + { + title: title, + raw_title: raw_title, + speakers: speakers, + event_name: @event_name, + published_at: @metadata.published_at, + description: description, + video_id: @metadata.video_id + } + ) + end + + def keynote? + title_without_event_name.match(/keynote/i) + end + + private + + def extract_info_from_title + title_parts = title_without_event_name.split(SPEAKERS_SECTION_SEPARATOR) + speakers = title_parts.last.split(SEPARATOR_IN_BETWEEN_SPEAKERS).map(&:strip) + title = title_parts[0..-2].join(SPEAKERS_SECTION_SEPARATOR).gsub(/^\s*-/, "").strip + + { + title: keynote? ? remove_leading_and_trailing_separators_from(title_without_event_name) : remove_leading_and_trailing_separators_from(title), + speakers: speakers + } + end + + def speakers + raw_title_parts.first.split(SEPARATOR_IN_BETWEEN_SPEAKERS).map(&:strip) + end + + def raw_title + @metadata.title + end + + def title_without_event_name + # RubyConf AU 2013: From Stubbies to Longnecks by Geoffrey Giesemann + # will return "From Stubbies to Longnecks by Geoffrey Giesemann" + remove_leading_and_trailing_separators_from(raw_title.gsub(@event_name, "").gsub(/\s+/, " ")) + end + + ## remove : - and other separators from the title + def remove_leading_and_trailing_separators_from(title) + return title if title.blank? + + title.gsub(/^[-:]?/, "").strip.then do |title| + title.gsub(/[-:,]$/, "").strip + end + end + + def title + remove_leading_and_trailing_separators_from(raw_title_parts[1]) + end + + def description + @metadata.description + end + + def raw_title_parts + title_without_event_name.split(SPEAKERS_SECTION_SEPARATOR) + end + end +end diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc new file mode 100644 index 000000000..fec129755 --- /dev/null +++ b/config/credentials.yml.enc @@ -0,0 +1 @@ +uAKB/HPZ9hm7lyAIpWgUe+24TG/N8bi2smtvEa7aD0nZNIU1sb0ctVEYNcSQbKJjHWSED68aF9/O7iYBt1QYU93in3J14rDvj0bHJ8GCWNEQFI6QekRPcOVrX4qehGn4Y29ikhsrc1/th6V0EHrkP4q3d+AtK0zazPLpLQgMFSMX5dYjck2vT8HfK3nOvX77+RUPXhyyO9roIBDBpSf8kEayzUi0q/h/k8cGsqbM3aL2InfXNM8gaQgJ7atEAzJsKoyt5yGoFxjWTDoOFEqnIIhXu1uRmW+S5aKUC/h0Kil/nEgsvufZGuPiDQgHvXZmO/3W3MmaCLaO2LHcp4qMySaH5SDBOXdzAmGuEl0SMhdyvtuZBCw60WmWRhh9GnhwBwJs/FdlaGnAGLZyB+lQhYYNTOww--9Tq1/zY6N+kujjV9--iOafU6Imt5fluW+yk+MPWQ== \ No newline at end of file diff --git a/data/friendly-rb/friendly-rb-2023/videos.yml b/data/friendly-rb/friendly-rb-2023/videos.yml new file mode 100644 index 000000000..9e577eb45 --- /dev/null +++ b/data/friendly-rb/friendly-rb-2023/videos.yml @@ -0,0 +1,308 @@ +--- +- title: Zeitwerk Internals + raw_title: Xavier Noria - Zeitwerk Internals + speakers: + - Xavier Noria + event_name: Friendly.rb 2023 + published_at: '2023-12-05' + description: |- + Xavier Noria is a Rails core member & author of the Zeitwerk gem. He's speaking at Friendly.rb about How Zeitwerk works internally. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: 4n2Nhw3vzIM + +- title: "Lightning Talk: Ruby and the Lisp" + raw_title: Marian Posăceanu - Ruby and the Lisp - Lightning Talk + speakers: + - Marian Posăceanu + + event_name: Friendly.rb 2023 + published_at: '2023-12-06' + description: |- + Marian is a talented Ruby developer from the seaside of Romania, where he's making the World Economic Forum stay on track while exploring his passions. He shared his passion for lisp at Friendly.rb. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: eOmF9SnIG5A + +- title: "Lightning Talk: Making music with Ruby and Sonic Pi" + raw_title: Julian Cheal - Making music with Ruby and Sonic Pi - Lightning Talk + speakers: + - Julian Cheal + event_name: Friendly.rb 2023 + published_at: '2023-12-06' + description: |- + Julian Cheal is a British Ruby/Rails developer with a pen­chant for tweed, fine coffee, and homebrewing. At Friendly.rb he gave a cool demo on how one can create music using Sonic Pi and Ruby. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: "-oZVEAtdXDM" + +- title: Use Turbo Native to make hybrid apps that don't suck + raw_title: Ayush Newatia - Use Turbo Native to make hybrid apps that don't suck + speakers: + - Ayush Newatia + event_name: Friendly.rb 2023 + published_at: '2023-12-14' + description: |- + Ayush is the author of The Rails and Hotwire codex, Bridgetown core member, and Just a spec podcast host. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: N4g_raRF-cE + +- title: Getting the most out of Chat GPT + raw_title: Jason Swett - Getting the most out of Chat GPT + speakers: + - Jason Swett + event_name: Friendly.rb 2023 + published_at: '2023-12-14' + description: |- + Jason Swett is the host of the Code with Jason podcast, Code with Jason Meetup, and author of his snail mail Nonsense Monthly and The Complete Guide to Rails Testing book. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: ga0h17TUuX0 + +- title: "Lightning Talk: Become a Roma connoisseur in less than 5 minutes" + raw_title: Marian Dumitru - Become a Roma connoisseur in less than 5 minutes - Lightning + Talk + speakers: + - Marian Dumitru + event_name: Friendly.rb 2023 + published_at: '2023-12-14' + description: |- + Marian Dumitru is a funny self-taught developer that shared with us the history of the Roma people. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: nN7MtpSNyhI + +- title: Mental Health for Developers + raw_title: Irina Paraschiv - Mental Health for Developers + speakers: + - Irina Paraschiv + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Irina is a licensed Psychotherapist, Emotional Educator, and the Co-founder of Acertivo, the Mental Health platform, designed for agile teams + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: bnKjnxUL1MI + +- title: Service modeling at GitHub + raw_title: Elena Tănăsoiu - Service modeling at GitHub + speakers: + - Elena Tănăsoiu + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Elena Tănăsoiu is a Senior Engineer at GitHub. She spoke about how they do service modeling and other things at GitHub. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: 2G35mRB0WFk + +- title: "Lightning Talk: From a spreadsheet to a Rails app in 5 minutes" + raw_title: Lorin Thwaits - From a spreadsheet to a Rails app in 5 minutes - Lightning + Talk + speakers: + - Lorin Thwaits + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Lorin has been involved with data for three decades and somehow never gets tired of it! He's on a mission to make life easier for developers and product people around the world. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: kTeOovIoSQg + +- title: 'React-ing to Rails: Why Ruby on Rails is the best Stop + for Web Developer' + raw_title: 'Naijeria Toweett - React-ing to Rails: Why Ruby on Rails is the best + Stop for Web Developer' + speakers: + - Naijeria Toweett + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Naijeria is a product manager turned Rails developer, and she talks about her experience from not being in tech, to learning React and then switching to Rails. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: SasYDQwtdr0 + +- title: The state of the Rubyverse + raw_title: Lucian Ghindă - The state of the Rubyverse + speakers: + - Lucian Ghindă + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Lucian Ghindă is a passionate Ruby developer and the author of the Short Ruby Newsletter. + He was the best person to deliver the State of the Rubyverse with us as he watches everything that happens online with our beloved programming language. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: QrH2A70JlsM + +- title: 'The Power of We: Unleashing the Collective Strength of + Your Team' + raw_title: 'Gabriela Luhova - The Power of We: Unleashing the Collective Strength + of Your Team' + speakers: + - Gabriela Luhova + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Gabriela Luhova is a prominent Ruby community member from Bulgaria, Rails Girls, and Balkan Ruby co-organizer. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: SLqb5x-Mu7w + +- title: Making it as an Indie Developer + raw_title: Jeremy Smith - Making it as an Indie Developer + speakers: + - Jeremy Smith + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Jeremy Smith is the co-host of the IndieRails podcast and Blue Ridge Ruby organizer. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: HC2T5ekVXPg + +- title: Let there be docs! + raw_title: Svyatoslav Kryukov - Let there be docs! + speakers: + - Svyatoslav Kryukov + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Svyat is the funny one from Evil Martians. + + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: P86lC2EskaY + +- title: Crafting elegant code with ruby DSLs + raw_title: Tom de Bruijn - Crafting elegant code with ruby DSLs + speakers: + - Tom de Bruijn + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Tom is a software developer at AppSignal based in Amsterdam. He is one of the organizers of the Amsterdam Ruby meetup and Rails Girls workshops. + He gave a great talk at Friendly about how they design elegant code with Ruby DSLs. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: QrweucKRsmM + +- title: Beyond the service object + raw_title: Nick Sutterer - Beyond the service object + speakers: + - Nick Sutterer + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Nick is an Open-Source developer at Trailblazer GmbH, pushing the limits of Ruby with his alternative frameworks. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: Eh2wATXq0_8 + +- title: "Lightning Talk: Hotwire Cookbook and common use cases" + raw_title: Yaroslav Shmarov - Hotwire Cookbook and common use cases - Lightning + Talk + speakers: + - Yaroslav Shmarov + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Yaroslav Shmarov is the co-host of the Friendly Show podcast, a content creator on SupeRails.com, and a prominent Ruby community member who focuses on education. + He gave a surprise (even from him) talk, encouraging us to try Hotwire. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: fdMGUV_E4yU + +- title: "Lightning Talk: Ruby, the hidden programming teacher" + raw_title: Victor Motogna - Ruby, the hidden programming teacher - Lightning Talk + speakers: + - Victor Motogna + event_name: Friendly.rb 2023 + published_at: '2023-12-28' + description: |- + Victor Motogna is the Head of Web Development at Wolfpack Digital a well-known development agency from Cluj. + + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: FIcZkeaP560 + +- title: Friendly.rb conference opening + raw_title: Friendly.rb conference opening + speakers: + - Adrian Marin + event_name: Friendly.rb 2023 + published_at: '2024-01-05' + description: |- + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: CparT3Y4kYw + +- title: Friendly.rb conference closing + raw_title: Friendly.rb conference closing + speakers: + - Adrian Marin + event_name: Friendly.rb 2023 + published_at: '2024-01-05' + description: |- + Friendly.rb is an International Ruby Conference hosted in Bucharest at the end of September and focuses on community and creating connections. + + https://friendlyrb.com + https://twitter.com/friendlyrb + video_id: 9EneMns7IWU diff --git a/data/friendly-rb/playlists.yml b/data/friendly-rb/playlists.yml new file mode 100644 index 000000000..b8f885de7 --- /dev/null +++ b/data/friendly-rb/playlists.yml @@ -0,0 +1,10 @@ +--- +- id: PLjHS2aIdExPdwbsmv2-e3DFN677fyFme7 + title: Friendly.rb 2023 + description: 'Your friendly european Ruby conference in Bucharest, Romania' + published_at: '2023-10-30' + channel_id: UC-PJCpt-6EgR4Ks6e0RSs1g + year: '2023' + videos_count: 21 + metadata_parser: Youtube::VideoMetadata + slug: friendly-rb-2023 diff --git a/data/helveticruby/helveticruby-2023/videos.yml b/data/helveticruby/helveticruby-2023/videos.yml new file mode 100644 index 000000000..d37a348f8 --- /dev/null +++ b/data/helveticruby/helveticruby-2023/videos.yml @@ -0,0 +1,160 @@ +--- +- title: Profiling Ruby tests with Swiss precision + raw_title: Profiling Ruby tests with Swiss precision by Vladimir Dementyev + speakers: + - Vladimir Dementyev + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + Tests occupy a significant amount of developers’ time. We write them, run locally, and wait for CI builds to complete—the latter can last from a cup of coffee to a good day nap. And unfortunately, such “naps” are pretty common in the Ruby and Rails world. + + Luckily, the reasons for slow tests vary greatly between codebases: misconfigured environment, test-unfriendly dependencies, and, of course, factories and database interactions in general. + + I like to demonstrate the tools and techniques to help you identify bottlenecks in test suites to help you stay awake. + video_id: WNluKNQ1OFU + +- title: A Sneak Peek into Ractors! + raw_title: A Sneak Peek into Ractors! by Abiodun Olowode + speakers: + - Abiodun Olowode + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: Are you tired of dealing with race conditions in your Ruby code? Introducing + Ractors - an experimental feature designed for parallel execution without thread-safety + concerns. But are they really as fast as threads? And are they worth the trouble? + In this talk, we'll explore the ins and outs of Ractors, shedding light on how + they work and helping you decide if they're right for your project + video_id: GhPAMDdOnU0 + +- title: How to Keep your Database Happy + raw_title: How to Keep your Database Happy by Karen Jex + speakers: + - Karen Jex + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + You don't want to spend too much time looking after your database; you've got better things to do with your time, but you do want your database to run smoothly and perform well. Fortunately, there are a few simple things that you can do to make sure your database ticks along nicely in the background. + I've put together my top 5 tips, based on things that have been useful to me as a DBA. The focus will be on Postgres, but most of the tips are also relevant to other databases. These are things you can put in place, without too much effort, to make sure your database works well. + video_id: y13fs-q4WGo + +- title: Postcards From An Early-Career Developer's First Months + raw_title: Postcards From An Early-Career Developer's First Months by Harriet Oughton + speakers: + - Harriet Oughton + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + Postcards From An Early-Career Developer's First Months: Recognising the Struggles and the Joys. + + In the fast-paced learning environment of software development, it can be hard for more established developers to remember the experience of someone finding their feet in their first software role. This talk aims to remind most of us of the common things that new developers learn, grapple with and celebrate in the first few months on the job, and for the juniors themselves, to expose how common these struggles are (and hopefully provide some pointers along the way!). + video_id: jNY4CViM76U + +- title: "Lightning talk: Five Minutes of a Random Stranger Talking About Creativity" + raw_title: Five Minutes of a Random Stranger Talking About Creativity by Christina + Serra + speakers: + - Christina Serra + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + Five Minutes of a Random Stranger Talking About Creativity (and why you should squeeze it into your life) + + A lightning talk from the Helvetic Ruby 2023 conference. + + "Creative people are just born that way", right? Contrary to this opinion, like so many other things humans do, this too is a learned behavior! Lucky for us, right? Kinda like how “Some people are just born to program”, right? It may be more a mix of early and continued cultivated exposure and time+interest than lucky genes. Cultivating our creative juices has its benefits! This is a short 5-minute reminder on the why and how you can be even more awesome and add creativity back into your life, to help improve mental health, capacity for problem solving and joy. Like exercise, but more fun. + video_id: l1UG9lYDnNk + +- title: How to bootstrap your software startup + raw_title: How to bootstrap your software startup by Isabel Steiner + speakers: + - Isabel Steiner + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + In 2022, a close friend and former co-worker and myself founded The Happy Lab GmbH and we only had one purpose for the company: A place where happy co-workers develop products to make users happy. + + In 6 months we went from exploring the problem space to come up with the first hypotheses a to a platform with recurring revenue by following the principles of lean startup and applying all the techniques and methods we have learned in our 15+ years in product management, engineering and leadership positions. In my talk, I will walk the audience through our bootstrapping steps and learnings. + video_id: 20gPjHP5szQ + +- title: 'A Rails performance guidebook: from 0 to 1B requests/day' + raw_title: 'A Rails performance guidebook: from 0 to 1B requests/day by Cristian + Planas and Anatoly Mikhaylov' + speakers: + - Cristian Planas + - Anatoly Mikhaylov + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + Building a feature is not good enough anymore: all your work won't be of use if it's not performant enough. So how to improve performance? After all, performance is not an easy discipline to master: all slow applications are slow in their own way, meaning that there is no silver bullet for these kinds of problems. + + In this presentation, we will guide you across patterns, strategies, and little tricks to improve performance. We will do that by sharing real stories of our daily experience facing and solving real performance issues in an application that daily serves billions of requests per day. + video_id: uDb71s9MtVk + +- title: "Lightning talk: Sliced Ruby - Enforcing module boundaries with private_const and packwerk" + raw_title: 'Sliced Ruby: Enforcing module boundaries with private_const and packwerk + by Severin Ráz' + speakers: + - Severin Ráz + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + A lightning talk from the Helvetic Ruby 2023 conference. + + Ideas on how ruby can help you protect your architecture. I'll work through an example of tightly coupled classes where it's not apparent who calls who and who should be allowed to call who. This is refactored in a few steps towards a design where the ruby interpreter and the packwerk gem prevent certain errors alltogether. + video_id: ZBoiu0yUrwI + +- title: "Lightning talk: Conventionally-typed Ruby" + raw_title: Conventionally-typed Ruby by Josua Schmid + speakers: + - Josua Schmid + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: |- + A lightning talk from Helvetic Ruby 2023. + + Dynamically typed vs statically typed, come-on… Why can we not have the best of both worlds? I'd like to introduce the theoretical concept of a conventionally-typed Ruby. + video_id: MIl1AFWoAXQ + +- title: "Lightning talk: Ideas for growing our Ruby community" + raw_title: Ideas for growing our Ruby community by Lucian Ghinda + speakers: + - Lucian Ghinda + event_name: Helvetic Ruby 2023 + published_at: '2023-12-01' + description: "A lightning talk from the Helvetic Ruby 2023 conference.\n\nI want + to touch on some points about bringing more people into our Ruby community. \n\nI + will talk more about what we can share online that could reach someone interested + in learning Ruby: type of articles, project ideas, developer experience, starting + kits, and some other points. \n\nThe purpose of this talk is to start a conversation + or to invite people to share more." + video_id: qrXscRsObvo + +- title: Anatomy of a Sonic Pi Song + raw_title: Anatomy of a Sonic Pi Song by Raia + speakers: + - Raia + event_name: Helvetic Ruby 2023 + published_at: '2023-12-02' + description: 'Have you ever considered what makes a "good" song? Maybe it''s a sweet + melody, or the beat that keeps you pushing through to the end of a workout. Whatever + the use case, Ruby-based Sonic Pi can synthesize it. Raia guides participants + through coding a range of song components. Together, we''ll build a band of live + loops including: rhythm sections, melody, chord progressions and audio embellishments. + We''ll build a song that can be mixed and modified at will and in the process, + learn some key elements of what makes Sonic Pi "sing.”' + video_id: A7owAl1Q6PQ + +- title: The Functional Alternative + raw_title: The Functional Alternative by Ju Liu + speakers: + - Ju Liu + event_name: Helvetic Ruby 2023 + published_at: '2023-12-06' + description: We'll start with a simple Ruby Kata and solve it together, live, with + imperative programming. We'll then fix the many, many, many things we got wrong. + Then we'll solve the problem again using patterns from functional programming. + You'll leave this talk with a clear and concrete example of why functional programming + matters, why immutable code matters, and why it can help you writing bug-free + code. The next time you find yourself writing imperative code, you'll think about... + the functional alternative. + video_id: Fm099cLXdV8 diff --git a/data/helveticruby/helveticruby-2024/videos.yml b/data/helveticruby/helveticruby-2024/videos.yml new file mode 100644 index 000000000..3734d668d --- /dev/null +++ b/data/helveticruby/helveticruby-2024/videos.yml @@ -0,0 +1,136 @@ +--- +- title: Revisiting the Hotwire Landscape after Turbo 8 + raw_title: Revisiting the Hotwire Landscape after Turbo 8 by Marco Roth + speakers: + - Marco Roth + event_name: Helvetic Ruby 2024 + published_at: '2024-06-24' + description: |- + Hotwire has significantly altered the landscape of building interactive web applications with Ruby on Rails, marking a pivotal evolution toward seamless Full-Stack development. + + With the release of Turbo 8, the ecosystem has gained new momentum, influencing how developers approach application design and interaction. + + This session, led by Marco, a core maintainer of Stimulus, StimulusReflex, and CableReady, delves into capabilities introduced with Turbo 8, reevaluating its impact on the whole Rails and Hotwire ecosystem. + video_id: cBlHywmKId8 + +- title: The Boring Bits Bite Back + raw_title: The Boring Bits Bite Back by Katie Miller + speakers: + - Katie Miller + event_name: Helvetic Ruby 2024 + published_at: '2024-06-30' + description: Big is better right? Big data, big features, big customers. With those + big customers comes requests for big acronyms like SAML, SCIM and RBAC. Getting + those implemented depends on a strong foundation. The boring bits that were glossed + over when building the company. Users, Accounts, Authorization, Billing… We can + prevent heartache, tech debt and stress by getting a handle on them early on. + I’ll talk about how to think about these basics as you go without overthinking + it so hopefully you spend less time re-building the basics and more time creating + products that wow people. + video_id: 6g5phlssviM + +- title: Lessons learned from running Rails apps on-premise + raw_title: Lessons learned from running Rails apps on-premise by Andy Pfister + speakers: + - Andy Pfister + event_name: Helvetic Ruby 2024 + published_at: '2024-06-30' + description: '' + video_id: zh6jfFDHo8M + +- title: Ask your logs + raw_title: Ask your logs by Youssef Boulkaid + speakers: + - Youssef Boulkaid + event_name: Helvetic Ruby 2024 + published_at: '2024-06-27' + description: '' + video_id: _NcU_Dlq8R8 + +- title: The Very Hungry Transaction + raw_title: The Very Hungry Transaction by Daniel Colson + speakers: + - Daniel Colson + event_name: Helvetic Ruby 2024 + published_at: '2024-06-27' + description: |- + The story begins with a little database transaction. As the days go by, more and more business requirements cause the transaction to grow in size. We soon discover that it isn't a little transaction anymore, and it now poses a serious risk to our application and business. What went wrong, and how can we fix it? + + In this talk, we'll witness a database transaction gradually grow into a liability. We'll uncover some common but problematic patterns that can put our data integrity and database health at risk, and then offer strategies for fixing and preventing these patterns. + video_id: sGlpbp11SY4 + +- title: "Lightning talk: How to use Arel? Wrong answers only!" + raw_title: How to use Arel? Wrong answers only! by Dávid Halász + speakers: + - Dávid Halász + event_name: Helvetic Ruby 2024 + published_at: '2024-06-24' + description: '' + video_id: KJY1IPheVAk + +- title: "Lightning talk: Avoiding Sneaky Testing Antipatterns" + raw_title: Avoiding Sneaky Testing Antipatterns by Sarah Lima + speakers: + - Sarah Lima + event_name: Helvetic Ruby 2024 + published_at: '2024-06-27' + description: '' + video_id: m-cxOc5wgUU + +- title: "Lightning talk: Phantastic Phlex" + raw_title: Phantastic Phlex by Roland Studer + speakers: + - Roland Studer + event_name: Helvetic Ruby 2024 + published_at: '2024-06-27' + description: '' + video_id: n0mDMlC4O80 + +- title: "Lightning talk: 200k users in 3 years: How to do developer marketing" + raw_title: '200k users in 3 years: How to do developer marketing by Jenda Tovarys' + speakers: + - Jenda Tovarys + event_name: Helvetic Ruby 2024 + published_at: '2024-06-29' + description: '' + video_id: AxFBjiOZqO0 + +- title: "Lightning talk: On a mission for equality and diversity in tech" + raw_title: On a mission for equality and diversity in tech by Marion Schleifer + speakers: + - Marion Schleifer + event_name: Helvetic Ruby 2024 + published_at: '2024-06-24' + description: '' + video_id: 2tY3aEtInls + +- title: How to Accessibility if You’re Mostly Back-End + raw_title: How to Accessibility if You’re Mostly Back-End by Hilary Stohs-Krause + speakers: + - Hilary Stohs-Krause + event_name: Helvetic Ruby 2024 + published_at: '2024-07-15' + description: |- + When we think about “accessibility”, most of us associate it with design, HTML, CSS - in other words, the front-end. If you work primarily on the back-end of the tech stack, it’s easy to assume that your role is disengaged from accessibility concerns. + + In fact, there are multiple ways back-end devs can impact accessibility, both for external users and for colleagues. + + In this talk, we’ll walk through everything from APIs to specs to Ruby code to documentation, using examples throughout, to demonstrate how even those of us who rarely touch HTML can positively impact accessibility for all. + video_id: 4TQzELedOGI + +- title: 'The Power of Crystal: A language for humans and computers' + raw_title: 'The Power of Crystal: A language for humans and computers by Johannes + Müller' + speakers: + - Johannes Müller + event_name: Helvetic Ruby 2024 + published_at: '2024-06-30' + description: |- + Crystal is a language with a focus on developer happiness, like Ruby. The syntax and OOP model resemble that and any Ruby developer feels right at home. + + It's statically typed and compiles to native code, making it intrinsically type safe and blazingly fast. Built-in type inference makes most type annotations unnecessary, resulting in easy to read and clean code. + + It can be a good asset for performance-critical applications and is very approachable for Rubyists + + Crystal is a joy to work with and having it in your toolbox is an asset, even when writing Ruby code. + video_id: XdOh82qLzZQ diff --git a/data/helveticruby/playlists.yml b/data/helveticruby/playlists.yml new file mode 100644 index 000000000..1608c2771 --- /dev/null +++ b/data/helveticruby/playlists.yml @@ -0,0 +1,20 @@ +--- +- id: PL4jngagx9f7TIyNkSkS15oDrVPCa7LXsT + title: Helvetic Ruby 2023 + description: Talks from the 2023 edition of Helvetic Ruby, a local Ruby conference in Switzerland. + published_at: '2023-12-01' + channel_id: UChetoakh7nU0EXrKN8QFUUA + year: '2023' + videos_count: 13 + metadata_parser: Youtube::VideoMetadata + slug: helveticruby-2023 + +- id: PL4jngagx9f7RGaAjXE0PR3z_jsA9cyCji + title: Helvetic Ruby 2024 + description: Talks from the 2024 edition of Helvetic Ruby, a local Ruby conference in Switzerland. + published_at: '2024-06-04' + channel_id: UChetoakh7nU0EXrKN8QFUUA + year: '2024' + videos_count: 13 + metadata_parser: Youtube::VideoMetadata + slug: helveticruby-2024 diff --git a/data/organisations.yml b/data/organisations.yml index 2c1edfcf6..729a389c6 100644 --- a/data/organisations.yml +++ b/data/organisations.yml @@ -31,3 +31,23 @@ slug: rubyconf language: english youtube_channel_id: UCWnPjmqvljcafA0z2U1fwKQ +- name: Friendly.rb + website: https://friendlyrb.com/ + twitter: friendlyrb + slug: friendly-rb + youtube_channel_name: friendlyrb + youtube_channel_id: UC-PJCpt-6EgR4Ks6e0RSs1g # This is optional + kind: conference # Choose either 'conference' or 'meetup' + frequency: yearly # Specify if it's 'yearly' or 'monthly' + language: english # Default language of the talks from this conference +- name: Helvetic Ruby + website: https://helvetic-ruby.ch + twitter: helvetic_ruby + kind: conference + frequency: yearly + playlist_matcher: + default_country_code: + youtube_channel_name: HelveticRuby + slug: helveticruby + language: english + youtube_channel_id: UChetoakh7nU0EXrKN8QFUUA diff --git a/data/railsconf/playlists.yml b/data/railsconf/playlists.yml index 62f2cf701..6916acf13 100644 --- a/data/railsconf/playlists.yml +++ b/data/railsconf/playlists.yml @@ -118,3 +118,12 @@ year: "2023" videos_count: 58 slug: railsconf-2023 +- id: PLbHJudTY1K0chrs_E_XFz2pOJ3d8jCayh + title: RailsConf 2024 + description: + RailsConf, hosted by Ruby Central, is the world’s largest and longest-running + gathering of Ruby on Rails enthusiasts, practitioners, and companies. + published_at: "2024-07-10" + year: "2024" + videos_count: 58 + slug: railsconf-2024 diff --git a/data/railsconf/railsconf-2024/videos.yml b/data/railsconf/railsconf-2024/videos.yml new file mode 100644 index 000000000..8f00aa446 --- /dev/null +++ b/data/railsconf/railsconf-2024/videos.yml @@ -0,0 +1,550 @@ +--- +- title: Conference Welcome + raw_title: RailsConf 2024 - Conference Welcome with Andy Croll and Adarsh Pandit + speakers: + - Andy Croll + - Adarsh Pandit + event_name: RailsConf 2024 + published_at: '2024-05-21' + description: '' + video_id: VCLcaLK8_0U +- title: "Keynote: Getting to Two Million Users as a One Woman Dev Team" + raw_title: RailsConf 2024 - Opening Conference Keynote by Nadia Odunayo + speakers: + - Nadia Odunayo + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: '' + video_id: TWi-cSHNr5s +- title: How to Accessibility if You’re Mostly Back-End + raw_title: RailsConf 2024 - How to Accessibility if You’re Mostly Back-End by Hilary + Stohs-Krause + speakers: + - Hilary Stohs-Krause + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: If you work mostly on the back-end of the tech stack, it’s easy to + assume that your role is disengaged from accessibility concerns. After all, that’s + the front-end’s job! However, there are multiple, specific ways back-end devs + can impact accessibility - not just for users, but also for colleagues. + video_id: GyUxe7PMD4A +- title: So writing tests feels painful. What now? + raw_title: RailsConf 2024 - So writing tests feels painful. What now? by Stephanie + Minn + speakers: + - Stephanie Minn + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + When you write tests, you are interacting with your code. Like any user experience, you may encounter friction. Stubbing endless methods to get to green. Fixing unrelated spec files after a minor change. Rather than push on, let this tedium guide you toward better software design. + + With examples in RSpec, this talk will take you step-by-step from a troublesome test to an informed refactor. Join me in learning how to attune to the right signals and manage complexity familiar to any Rails developer. You’ll leave with newfound inspiration to write clear, maintainable tests in peace. Your future self will thank you! + video_id: VmWCJFiU1oM +- title: Ask your logs + raw_title: RailsConf 2024 - Ask your logs by Youssef Boulkaid + speakers: + - Youssef Boulkaid + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Logging is often an afterthought when we put our apps in production. It's there, it's configured by default and it's... good enough? + + If you have ever tried to debug a production issue by digging in your application logs, you know that it is a challenge to find the information you need in the gigabyte-sized haystack that is the default rails log output. + + In this talk, let's explore how we can use structured logging to turn our logs into data and use dedicated tools to ask — and answer — some non-obvious questions of our logs. + video_id: y-VMajyrQnU +- title: How to make your application accessible (and keep it that way!) + raw_title: RailsConf 2024 - How to make your application accessible (and keep it + that way!) by Joel Hawksley + speakers: + - Joel Hawksley + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: 'Our industry is shockingly bad at accessibility: by some estimates, + over 70% of websites are effectively unavailable to blind users! Making your app + accessible isn’t just the right thing to do, it’s the law. In this talk, we’ll + share what it’s taken to scale GitHub’s accessibility program and equip you to + do the same at your company.' + video_id: ZRUn-yRH0ks +- title: 'Ruby on Fails: effective error handling with Rails conventions' + raw_title: 'RailsConf 2024 - Ruby on Fails: effective error handling with... by + Talysson Oliveira Cassiano' + speakers: + - Talysson Oliveira Cassiano + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Ruby on Fails - effective error handling with Rails conventions by Talysson Oliveira Cassiano + + You ask 10 different developers how they handle errors in their applications, you get 10 very different answers or more, that’s wild. From never raising errors to using custom errors, rescue_from, result objects, monads, we see all sorts of opinions out there. Is it possible that all of them are right? Maybe none of them? Do they take advantage of Rails conventions? In this talk, I will show you error-handling approaches based on patterns we see on typical everyday Rails applications, what their tradeoffs are, and which of them are safe defaults to use as a primary choice when defining the architecture of your application + video_id: qFZb9fMz8bs +- title: 'Look Ma, No Background Jobs: A Peek into the Async Future' + raw_title: 'RailsConf 2024 - Look Ma, No Background Jobs: A Peek into the Async + Future by Manu J' + speakers: + - Manu J + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Executing a long running task like external API requests in the request-response cycle is guaranteed to bring your Rails app to its knees sooner or later. We have relied on background jobs to offload long running tasks due to this. + + But it doesn't always have to be. Learn how you can leverage Falcon and the Async gem to unlock the full potential of ruby fibers and eliminate background jobs for IO-bound tasks and execute them directly with clean, simple, performant and scalable code. + video_id: QeYcKw7nOkg +- title: Ruby & Rails Versioning at Scale + raw_title: RailsConf 2024 - Ruby & Rails Versioning at Scale by George Ma + speakers: + - George Ma + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: In this talk we will dive into how Shopify automated Rails upgrades + as well as leveraged Dependabot, Rubocop, and Bundler to easily upgrade and maintain + 300+ Ruby Services at Shopify to be on the latest Ruby & Rails versions. You'll + learn how you can do the same! + video_id: XBdsKmxS2lw +- title: 'What''s in a Name: From Variables to Domain-Driven Design' + raw_title: 'RailsConf 2024 - What''s in a Name: From Variables to Domain-Driven + Design by Karynn Ikeda' + speakers: + - Karynn Ikeda + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: 'Join me on a crash course in semantic theory to unpack one of the + hardest problems in software engineering: naming things. Dive into how names act + as a linguistic front-end, masking a more complex backend of unseen associations. + We’ll start from a single variable name and zoom out to the vantage point of domain-driven + design, and track how consequential naming is at each stage to help you improve + your code, no matter your level of experience.' + video_id: 1flw60hwcLg +- title: Crafting Rails Plugins + raw_title: RailsConf 2024 - Crafting Rails Plugins by Chris Oliver + speakers: + - Chris Oliver + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Ever wanted to build a plugin for Rails to add new features? Rails + plugins allow you to hook into the lifecycle of a Rails application to add routes, + configuration, migrations, models, controllers, views and more. In this talk, + we'll learn how to do this by looking at some examples Rails gems to see how they + work. + video_id: LxTCpTXhpzw +- title: From Cryptic Error Messages To Rails Contributor + raw_title: RailsConf 2024 - From Cryptic Error Messages To Rails Contributor by + Collin Jilbert + speakers: + - Collin Jilbert + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Discover how encountering perplexing and misleading error messages + in Ruby on Rails can lead to opportunities for contribution by delving into a + real-world example. Join me as we dissect a perplexing Ruby on Rails error by + navigating the source code. Discover how seemingly unrelated errors can be intertwined. + As responsible community members, we'll explore turning this into an opportunity + for contribution. Learn to navigate Rails, leverage Ruby fundamentals, and make + impactful changes. From local experiments to contribution submission, empower + yourself to enhance the experience of building with Rails for yourself and the + community. + video_id: 7EpJQn6ObEw +- title: 'Plain, Old, but Mighty: Leveraging POROs in Greenfield and Legacy Code' + raw_title: 'RailsConf 2024 - Plain, Old, but Mighty: Leveraging POROs in Greenfield + and... by Sweta Sanghavi' + speakers: + - Sweta Sanghavi + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Plain, Old, but Mighty: Leveraging POROs in Greenfield and Legacy Code by Sweta Sanghavi + + Applications exist in changing ecosystems, but over time, they can become less responsive. Controllers actions slowly grow in responsibilities. Models designed for one requirement, no longer fit the bill, and require multi-step deploy processes to change. + + The plain old Ruby object, the mighty PORO, provides flexibility in both new domain and legacy code. + + Pair with me on how! We'll explore how we can leverage POROs in our application through some real world examples. We'll use objects as a facade for domain logic in development, and refactor objects out of legacy code to increase readability, ease of testing, and flexibility. You'll leave this session with some strategies to better leverage Ruby objects in your own application. + video_id: KQHD-0y8tDw +- title: 'A Rails server in your editor: Using Ruby LSP to extract runtime information' + raw_title: 'RailsConf 2024 - A Rails server in your editor: Using Ruby LSP to extract + runtime... by Andy Waite' + speakers: + - Andy Waite + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + A Rails server in your editor: Using Ruby LSP to extract runtime information by Andy Waite + + Language servers, like the Ruby LSP, typically use only static information about the code to provide editor features. But Ruby is a dynamic language and Rails makes extensive use of its meta-programming features. Can we get information from the runtime instead and use that to increase developer happiness? + + In this talk, we’re going to explore how the Ruby LSP connects with the runtime of your Rails application to expose information about the database, migrations, routes and more. Join us for an in-depth exploration of Ruby LSP Rails, and learn how to extend it to support the Rails features most important to your app. + video_id: oYTwUHAdH_A +- title: Implementing Native Composite Primary Key Support in Rails 7.1 + raw_title: RailsConf 2024 - Implementing Native Composite Primary Key Support in + Rails 7.1 by Nikita Vasilevsky + speakers: + - Nikita Vasilevsky + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Explore the new feature of composite primary keys in Rails! Learn how + to harness this powerful feature to optimize your applications, and gain insights + into the scenarios where it can make a significant difference in database performance. + Elevate your Rails expertise and stay ahead of the curve! + video_id: Gm5Aiai368Y +- title: 'Riffing on Rails: sketch your way to better designed code' + raw_title: 'RailsConf 2024 - Riffing on Rails: sketch your way to better designed + code by Kasper Timm Hansen' + speakers: + - Kasper Timm Hansen + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Say you've been tasked with building a feature or subsystem in a Rails app. How do you get started? How do you plan out your objects? How do you figure out the names, responsibilities, and relationships? While some reach for pen & paper and others dive straight into implementation, there's a third option: Riffing on Rails. + + When you riff, you work with Ruby code in a scratch file to help drive your design. This way you get rapid feedback and can revise as quickly as you had the idea — try out alternative implementations too! It's great for building shared understanding by pairing with a coworker. + + Walk away with new ideas for improving your software making process: one where code is less daunting & precious. Riffing gives you space & grace to try more approaches & ideas. Let's riff! + video_id: vH-mNygyXs0 +- title: Save Time with Custom Rails Generators + raw_title: RailsConf 2024 - Save Time with Custom Rails Generators by Garrett Dimon + speakers: + - Garrett Dimon + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Become skilled at quickly creating well-tested custom generators and + turn those tedious and repetitive ten-minute distractions into ten-second commands—not + just for you but for your entire team. With some curated knowledge and insights + about custom generators and some advanced warning about the speed bumps, it can + save time in far more scenarios than you might think. + video_id: kKhzSge226g +- title: Closing Day 1 + raw_title: RailsConf 2024 - Closing Day 1 with Andy Croll + speakers: + - Andy Croll + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Closing Day 1 with Andy Croll + video_id: 1-cPB5Ft9Kk +- title: 'Keynote: Startups on Rails in 2024' + raw_title: 'RailsConf 2024 - Keynote: Startups on Rails in 2024 by Irina Nazarova' + speakers: + - Irina Nazarova + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Let’s hear from startups that chose Rails in recent years. Would you be surprised to hear that Rails is quietly recommended founder to founder in the corridors of Y Combinator? But it’s not only the praise that is shared. + + Rails is a 1-person framework, and the framework behind giants like Shopify. Airbnb, Twitter and Figma started on Rails back in the days, but those are stories of the past. As the new businesses switched to prioritizing productivity and pragmatism again, Rails 7 had stepped up its game with Hotwire. But is the startup community ready to renew the vows with Rails and commit to each other again? The answer is: Maybe! + + Let’s use feedback from those founders to discuss how Rails has aided their growth and what improvements would help more founders start-up on Rails! + video_id: "-sFYiyFQMU8" +- title: Day 2 Welcome + raw_title: RailsConf 2024 - Day 2 Welcome with Ufuk Kayserilioglu + speakers: + - Ufuk Kayserilioglu + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: '' + video_id: U6JsnCZiHQI +- title: "Keynote: Vernier - A next Generation Ruby Profiler" + raw_title: RailsConf 2024 - Day 2 Keynote by John Hawthorn + speakers: + - John Hawthorn + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: 'This talk introduces Vernier: a new sampling profiler for Ruby 3.2+ + which is able to capture more details than existing tools including threads, ractors, + the GVL, Garbage Collection, idle time, and more!' + video_id: WFtZjGT8Ih0 +- title: 'From slow to go: Rails test profiling hands-on' + raw_title: 'RailsConf 2024 - From slow to go: Rails test profiling hands-on by Vladimir + Dementyev' + speakers: + - Vladimir Dementyev + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Ever wished your Rails test suite to complete faster so you don’t waste your time procrastinating while waiting for the green light (or red, who knows—it’s still running)? Have you ever tried increasing the number of parallel workers on CI to solve the problem and reached the limit so there is no noticeable difference anymore? + + If these questions catch your eye, come to my workshop on test profiling and learn how to identify and fix test performance bottlenecks in the most efficient way. And let your CI providers not complain about the lower bills afterward. + + I will guide you through the test profiling upside-down pyramid, from trying to apply common Ruby profilers (Stackprof, Vernier) and learn from flamegrpahs to identifying test-specific performance issues via the TestProf toolbox. + video_id: PvZw0CnZNPc +- title: TDD for Absolute Beginners + raw_title: RailsConf 2024 - TDD for Absolute Beginners by Jason Swett + speakers: + - Jason Swett + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: We're often taught that test-driven development is all about red-green-refactor. + But WHY do we do it that way? And could it be that they way TDD is usually taught + is actually misleading, and that there's a different and better way? In this workshop + you'll discover a different, easier way to approach test-driven development. + video_id: I5KnvTttfOM +- title: 'SQLite on Rails: From rails new to 50k concurrent users and everything in between' + raw_title: 'RailsConf 2024 - SQLite on Rails: From rails new to 50k concurrent... + by Stephen Margheim' + speakers: + - Stephen Margheim + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: "SQLite on Rails: From rails new to 50k concurrent users and everything + in between by Stephen Margheim \n\nLearn how to build and deploy a Rails application + using SQLite with hands-on exercises! Together we will take a brand new Rails + application and walk through various features and enhancements to make a production-ready, + full-featured application using only SQLite. We will take advantage of SQLite's + lightweight database files to create separate databases for our data, job queue, + cache, error monitoring, etc. We will install and use a SQLite extension to build + vector similarity search. We will setup point-in-time backups with Litestream. + We will also explore how to deploy your application. By the end of this workshop, + you will understand what kinds of applications are a good fit for SQLite, how + to build a resilient SQLite on Rails application, and how to scale to 50k+ concurrent + users." + video_id: cPNeWdaJrL0 +- title: Let’s Extend Rails With A Gem + raw_title: RailsConf 2024 - Let’s Extend Rails With A Gem by Noel Rappin + speakers: + - Noel Rappin + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Rails is powerful, but it doesn’t do everything. Sometimes you want + to build your own tool that adds functionality to Rails. If it’s something that + might be useful for other people, you can write a Ruby Gem and distribute it. + In this workshop, we will go through the entire process of creating a gem, starting + with “bundle gem” and ending with how to publish it with “gem push”. Along the + way, we’ll show how to get started, how to manage configuration, how to be part + of Rails configuration, whether you want to be a Rails Engine, and how to test + against multiple versions of Rails. After this workshop, you will have all the + tools you need to contribute your own gem to the Rails community. + video_id: eQvwn8p4HnE +- title: Build High Performance Active Record Apps + raw_title: RailsConf 2024 - Build High Performance Active Record Apps by Andrew + Atkinson + speakers: + - Andrew Atkinson + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + In this workshop, you'll learn to leverage powerful Active Record capabilities to bring your applications to the next level. We'll start from scratch and focus on two major areas. We’ll work with high performance queries and we’ll configure and use multiple databases. + + You’ll learn how to write efficient queries with good visibility from your Active Record code. You’ll use a variety of index types to lower the cost and improve the performance of your queries. You'll use query planner info with Active Record. + + Next we'll shift gears into multi-database application design. You'll introduce a second database instance, set up replication between them, and configure Active Record for writer and reader roles. With that in place, you’ll configure automatic role switching. + video_id: 4SERkjBF-es +- title: This or that? Similar methods & classes in Ruby && Rails + raw_title: RailsConf 2024 - This or that? Similar methods & classes in Ruby && Rails + by Andy Andrea + speakers: + - Andy Andrea + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Working with Ruby and Rails affords access to a wealth of convenience, power and productivity. It also gives us a bunch of similar but distinct ways for checking objects' equality, modeling datetimes, checking strings against regular expressions and accomplishing other common tasks. Sometimes, this leads to confusion; other times, we simply pick one option that works and might miss out something that handles a particular use case better. + + In this talk, we'll take a look at groups of patterns, classes and methods often seen in Rails code that might seem similar or equivalent at first glance. We’ll see how they differ and look at any pros, cons or edge cases worth considering for each group so that we can make more informed decisions when writing our code. + video_id: tfxJyya6P6A +- title: Revisiting the Hotwire Landscape after Turbo 8 + raw_title: RailsConf 2024 - Revisiting the Hotwire Landscape after Turbo 8 by Marco + Roth + speakers: + - Marco Roth + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Hotwire has significantly altered the landscape of building interactive web applications with Ruby on Rails, marking a pivotal evolution toward seamless Full-Stack development. + + With the release of Turbo 8, the ecosystem has gained new momentum, influencing how developers approach application design and interaction. + + This session, led by Marco, a core maintainer of Stimulus, StimulusReflex, and CableReady, delves into capabilities introduced with Turbo 8, reevaluating its impact on the whole Rails and Hotwire ecosystem. + video_id: eh2joX5n58o +- title: 'Undervalued: The Most Useful Design Pattern' + raw_title: 'RailsConf 2024 - Undervalued: The Most Useful Design Pattern by Jared + Norman' + speakers: + - Jared Norman + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Value objects are one of the most useful but underused object-oriented + software design patterns. Now that Ruby has first class support for them, let’s + explore what we can do with them! Learn not just how and when to use value objects, + but also how they can be used to bridge different domains, make your tests faster + and more maintainable, and even make your code more performant. I’ll even show + how to combine value objects with the factory pattern to create the most useful + design pattern out there. + video_id: 4r6D0niRszw +- title: The Very Hungry Transaction + raw_title: RailsConf 2024 - The Very Hungry Transaction by Daniel Colson + speakers: + - Daniel Colson + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + The story begins with a little database transaction. As the days go by, more and more business requirements cause the transaction to grow in size. We soon discover that it isn't a little transaction anymore, and it now poses a serious risk to our application and business. What went wrong, and how can we fix it? + + In this talk we'll witness a database transaction gradually grow into a liability. We'll uncover some common but problematic patterns that can put our data integrity and database health at risk, and then offer strategies for fixing and preventing these patterns. + video_id: L1gQL_nw73s +- title: Insights Gained from Developing a Hybrid Application Using Turbo Native and Strada + raw_title: RailsConf 2024 - Insights Gained from Developing a Hybrid Application + Using... by John Pollard + speakers: + - John Pollard + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Insights Gained from Developing a Hybrid Application Using Turbo-Native and Strada by John Pollard + + In this session, we delve into the complexities and benefits of hybrid app development with Turbo-Native and Strada. We cover implementation intricacies, emphasizing strategic decisions and technical nuances. Key topics include crafting seamless mobile navigation and integrating native features for enhanced functionality. We also discuss the decision-making process for rendering pages, considering performance, user interaction, and feature complexity. Additionally, we explore creating usable native components that maintain app standards. Join us for practical insights learned from our hybrid app development journey. + video_id: fi9wytUSAYY +- title: 'Pairing with Intention: A Guide for Mentors' + raw_title: 'RailsConf 2024 - Pairing with Intention: A Guide for Mentors by Alistair + Norman' + speakers: + - Alistair Norman + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Learning as a new developer is difficult and sometimes overwhelming. + As mentors, we’re tasked with teaching newer developers everything they need to + know. Mentees can struggle to learn when presented with bigger picture concepts + like design patterns, testing practices, and complicated application structures + along with the details and basic syntax needed to write code all at once. We’ll + explore how to be intentional with your pair programming to help your mentee with + their desired learning outcomes while keeping them feeling engaged and empowered. + video_id: aEqMNVbUzew +- title: From Request To Response And Everything In Between + raw_title: RailsConf 2024 - From Request To Response And Everything In Between by + Kevin Lesht + speakers: + - Kevin Lesht + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + How does a web request make it through a Rails app? And, what happens when a lot of them are coming in, all at once? If you've ever been curious about how requests are handled, or about how to analyze and configure your infrastructure for optimally managing throughput, then this talk is for you! + + In this session, you'll learn about the makeup of an individual web request, how Rails environments can best be setup to handle many requests at once, and how to keep your visitors happy along the way. We'll start by following a single request to its response, and scale all the way up through navigating high traffic scenarios. + video_id: ExHNp0LGCVs +- title: Dungeons & Dragons & Rails + raw_title: RailsConf 2024 - Dungeons & Dragons & Rails by Joël Quenneville + speakers: + - Joël Quenneville + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: You’ve found your way through the dungeon, charmed your way past that + goblin checkpoint, and even slain a dragon. Now you face your biggest challenge + yet - building a digital character sheet in Rails. Normally taking on an interactive + beast like this requires a powerful spell like “react” but you’re all out of spell + slots. Luckily you found an unlikely weapon in the dragon’s lair. They call it + Turbo. Attune to your keyboards and roll for initiative! This task is no match + for us! + video_id: T7GdshXgQZE +- title: Attraction Mailbox - Why I love Action Mailbox + raw_title: RailsConf 2024 - Attraction Mailbox - Why I love Action Mailbox by Cody + Norman + speakers: + - Cody Norman + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Email is a powerful and flexible way to extend the capabilities of your Rails application. It’s a familiar and low friction way for users to interact with your app. + + As much as you may want your users to access your app, they may not need to. Email is a great example of focusing on the problem at hand instead of an over-complicated solution. + + We’ll take a deeper look at Action Mailbox and how to route and process your inbound emails. + video_id: i-RwxAVMP-k +- title: 'Dungeons and Developers: Uniting Experience Levels in Engineering Teams' + raw_title: 'RailsConf 2024 - Dungeons and Developers: Uniting Experience Levels + in... by Chantelle Isaacs' + speakers: + - Chantelle Isaacs + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Dungeons and Developers: Uniting Experience Levels in Engineering Teams by Chantelle Isaacs + + Join us in “Dungeons and Developers,” a unique exploration of team dynamics through the lens of Dungeons & Dragons. Discover how the roles and skills in D&D can enlighten the way we build, manage, and nurture diverse engineering teams. Whether you’re a manager aiming to construct a formidable team (Constitution) or an individual seeking to self-assess and advance your career (Charisma), this talk will guide you in leveraging technical and transferable talents. Together we’ll identify your developer archetype and complete a 'Developer Character Sheet'—our tool for highlighting abilities, proficiencies, and alignment in a fun, D&D-inspired format. Developers and managers alike will leave this talk with a newfound appreciation for the varied skills and talents each person brings to the table. + video_id: NHuJNDB8Dt8 +- title: 'From RSpec to Jest: JavaScript testing for Rails devs' + raw_title: 'RailsConf 2024 - From RSpec to Jest: JavaScript testing for Rails devs + by Stefanni Brasil' + speakers: + - Stefanni Brasil + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Do you want to write JavaScript tests but feel stuck transferring your testing skills to the JavaScript world? Do you wish that one day you could write JS tests as confidently as you write Ruby tests? If so, this talk is for you. + Let’s face it: JavaScript isn’t going anywhere. One way to become more productive is to be confident with writing JavaScript automated tests. + Learn how to use Jest, a popular JavaScript testing framework. Let's go through the basics of JavaScript Unit testing with Jest, gotchas, and helpful tips to make your JS testing experience more joyful. + By the end of this talk, you’ll have added new skills to your JS tests toolbox. How to set up test data, mock HTTP requests, assert elements in the DOM, and more helpful bites to cover your JavaScript code confidently. + video_id: 9ewZf4gK_Gg +- title: 'Glimpses of Humanity: My Game-Building AI Pair' + raw_title: 'RailsConf 2024 - Glimpses of Humanity: My Game-Building AI Pair by Louis + Antonopoulos' + speakers: + - Louis Antonopoulos + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + I built a Rails-based game with a partner...an AI partner! + + Come see how I worked with my associate, Atheniel-née-ChatGPT, and everything we achieved. + + Leave with an improved understanding of how to talk to that special machine in your life ❤️❤️❤️ and an increased sense of wonder at how magical an extended machine-human conversation can be. + + I'll be taking you through our entire shared experience, from discovering and iterating on our initial goals, to coming up with a project plan, to developing a working product. + + This is not "AI wrote a game" -- this is "Learn how to pair with an artificial intelligence as if they were a human partner, and push the boundaries of possibility!" + video_id: tOhJ-OHmQRs +- title: 'Beyond senior: lessons from the technical career path' + raw_title: 'RailsConf 2024 - Beyond senior: lessons from the technical career path + by Dawn Richardson' + speakers: + - Dawn Richardson + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: Staff, principal, distinguished engineer - there is an alternate path + to people management if continuing up the "career ladder" into technical leadership. + As a relatively new 'Principal Engineer', I want to report back on my learnings + so far; things I wish I had known before stepping into this role 3 years ago. + video_id: r7g6XicVZ1c +- title: Progressive Web Apps with Ruby on Rails + raw_title: RailsConf 2024 - Progressive Web Apps with Ruby on Rails by Avi Flombaum + speakers: + - Avi Flombaum + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Progressive Web Apps (PWAs) have emerged as a solution for offering the seamless experience of native apps combined with the reach and accessibility of the web. This talk will dive into building an offline-first RSS feed reader that leverages the full potential of PWAs such as Service Workers, Background Sync, + + We'll explore how to register, install, and activate a service worker in a Rails application. + + We'll delve into the Push API integrated with service workers, discussing how to subscribe users to notifications. + + We'll cover setting up background sync in our service worker, creating a system that automatically updates the cached RSS feeds and articles. + + The talk will not only solidify the concepts discussed but also provide attendees with a clear roadmap to developing their PWAs. + video_id: g_0OaFreX3U +- title: Using Postgres + OpenAI to power your AI Recommendation Engine + raw_title: RailsConf 2024 - Using Postgres + OpenAI to power your AI Recommendation... + by Chris Winslett + speakers: + - Chris Winslett + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: |- + Using Postgres + OpenAI to power your AI Recommendation Engine by Chris Winslett + + Did you know that Postgres can easily power a recommendation engine using data from OpenAI? It's so simple, it will blow your mind. + + For this talk, we will use Rails, ActiveRecord + Postgres, and OpenAI to build a recommendation engine. Then, in the second half, we'll present optimization and scaling techniques because AI data is unique for the scaling needs. + video_id: eG_vFj5x4Aw +- title: Day 3 Closing + raw_title: RailsConf 2024 - Day 3 Closing with Ufuk Kayserilioglu and Andy Croll + speakers: + - Ufuk Kayserilioglu + - Andy Croll + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: '' + video_id: gHANy_j0nEQ +- title: Closing Keynote + raw_title: RailsConf 2024 - Closing Keynote by Aaron Patterson + speakers: + - Aaron Patterson + event_name: RailsConf 2024 + published_at: '2024-05-24' + description: '' + video_id: "--0pXVadtII" diff --git a/data_preparation/organisations.yml b/data_preparation/organisations.yml new file mode 100644 index 000000000..cca97c279 --- /dev/null +++ b/data_preparation/organisations.yml @@ -0,0 +1,12 @@ +--- +- name: RailsWorld + website: https://rubyonrails.org/world + twitter: rails + kind: conference + frequency: yearly + playlist_matcher: + default_country_code: + youtube_channel_name: railsofficial + slug: railsworld + language: english + youtube_channel_id: UC9zbLaqReIdoFfzdUbh13Nw diff --git a/db/migrate/20230625215935_add_twitter_to_organisation.rb b/db/migrate/20230625215935_add_twitter_to_organisation.rb new file mode 100644 index 000000000..517d941ee --- /dev/null +++ b/db/migrate/20230625215935_add_twitter_to_organisation.rb @@ -0,0 +1,6 @@ +class AddTwitterToOrganisation < ActiveRecord::Migration[7.1] + def change + add_column :organisations, :twitter, :string, default: "", null: false + add_column :organisations, :language, :string, default: "", null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index a8b096a43..139d22ec8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -82,6 +82,8 @@ t.string "youtube_channel_id", default: "", null: false t.string "youtube_channel_name", default: "", null: false t.string "slug", default: "", null: false + t.string "twitter", default: "", null: false + t.string "language", default: "", null: false t.index ["frequency"], name: "index_organisations_on_frequency" t.index ["kind"], name: "index_organisations_on_kind" t.index ["name"], name: "index_organisations_on_name" diff --git a/db/seeds.rb b/db/seeds.rb index a40fe8af4..fa9b15ea9 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -21,6 +21,7 @@ org.kind = organisation["kind"] org.frequency = organisation["frequency"] org.youtube_channel_id = organisation["youtube_channel_id"] + org.slug = organisation["slug"] # org.language = organisation["language"] end @@ -32,6 +33,8 @@ event = Event.create!(name: event_data["title"], date: event_data["published_at"], organisation: organisation) + event.update!(slug: event_data["slug"]) + puts event.slug unless Rails.env.test? talks = YAML.load_file("#{Rails.root}/data/#{organisation.slug}/#{event.slug}/videos.yml") diff --git a/docs/contributing.md b/docs/contributing.md index 8c7771190..3c9cd9084 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -2,25 +2,92 @@ This guide provides steps on how to contribute new videos to the platform. If you wish to make a contribution, please submit a Pull Request (PR) with the necessary information detailed below. -### Organization +There are a few scripts available to help you build those data files by scraping the Youtube API. To use them, you must first create a Youtube API Key and add it to your .env file. Here are the guidlines to get a key https://developers.google.com/youtube/registering_an_application -Firstly, the organization associated with the videos needs to be added to [organisations.yml](/data/organisations.yml). Here is a typical example using Railsconf as a reference: +``` +YOUTUBE_API_KEY=some_key +``` + +## Proposed Workflow + +The proposed workflow is to create the data files in the `/data_preparation` folder using the scripts. Once you have validated those files and eventually cleaned a few errors, you can copy them to `/data` and open a PR with that content. + +### Step 1 - Prepare the Organization + +Everything starts with an organization. An organization is the entity organizing the events. + +Add the following information to the `data_preparation/organisations.yml` file: ```yml - name: Railsconf website: https://railsconf.org/ twitter: railsconf - slug: railsconf youtube_channel_name: confreaks - youtube_channel_id: UCWnPjmqvljcafA0z2U1fwKQ # This is optional kind: conference # Choose either 'conference' or 'meetup' - frequency: yearly # Specify if it's 'yearly' or 'monthly' + frequency: yearly # Specify if it's 'yearly' or 'monthly'; if you need something else, open a PR with this new frequency language: english # Default language of the talks from this conference + default_country_code: AU # default country to be assigned to the associated events +``` + +Then run this script: + +```bash +rails runner script/prepare_organisations.rb +``` + +This will update your `data_preparation/organisations.yml` file with the youtube_channel_id information. + +### Step 2 - Create the Playlists + +This workflow assumes the Youtube channel is organized by playlist with 1 event equating to 1 playlist. Run the following script to create the playlist file: + +``` +rails runner script/create_playlists.rb +``` + +You will end up with a data structure like this: + +``` +data/ +├── organisations.yml +├── railsconf + └── playlists.yml ``` -### Playlist +At this point, go through the `playlists.yml` and perform a bit of verification and editing: + +- Add missing descriptions. +- Ensure all playlists are relevant. +- Ensure the year is correct. -For each organisation create a folder using the slug +**Multi-Events Channels** + +Some YouTube channels will host multiple conferences. For example, RubyCentral hosts Rubyconf and RailsConf. To cope with that, you can specify in the organization a regex to filter the playlists of this channel. The regex is case insensitive. + +Here is an example for RailsConf/RubyConf: + +```yml +- name: RailsConf + youtube_channel_name: confreaks + playlist_matcher: rails # will only select the playlist where there title match rails + youtube_channel_id: UCWnPjmqvljcafA0z2U1fwKQ + ... +- name: RubyConf + youtube_channel_name: confreaks + playlist_matcher: ruby # will only select the playlist where there title match ruby + youtube_channel_id: UCWnPjmqvljcafA0z2U1fwKQ + ... +``` + +### Step 3 - Create the Videos + +Once your playlists are currated, you can run the next script to extract the video information. It will iterate the playlist and extract all videos. + +```bash +rails runner script/extract_videos.rb +``` + +At this point you have this structure ``` data/ @@ -34,28 +101,20 @@ data/ ├── speakers.yml ``` -In this folder add a `playlists.yml` file with all the playlist for this event. Typically a playlist on Youtube will group all the video from one edition. - -### Videos - -For each play list create a directory with the slug of the playlist and add a videos.yml file. - -Inside this file you should have videos listed like that. +To extract a maximum of information from the Youbute metadata, the raw video information is parsed by a class `Youtube::VideoMetadata`. This class will try to extract speakers from the title. This is the default parser but sometime the speakers ar you can create a new class and specify it in the `playlists.yml` file. ```yml -- title: Security is hard, but we can't go shopping - speakers: - - André Arko - published_at: "2013-06-25" - description: |- - The last few months have been pretty brutal for anyone who depends on Ruby libraries in production. Ruby is really popular now, and that's exciting! But it also means that we are now square in the crosshairs of security researchers, whether whitehat, blackhat, or some other hat. Only the Ruby and Rails core teams have meaningful experience with vulnerabilites so far. It won't last. Vulnerabilities are everywhere, and handling security issues responsibly is critical if we want Ruby (and Rubyists) to stay in high demand. - Using Bundler's first CVE as a case study, I'll discuss responsible disclosure, as well as repsonsible ownership of your own code. How do you know if a bug is a security issue, and how do you report it without tipping off someone malicious? As a Rubyist, you probably have at least one library of your own. How do you handle security issues, and fix them without compromising apps running on the old code? Don't let your site get hacked, or worse yet, let your project allow someone else's site to get hacked! Learn from the hard-won wisdom of the security community so that we won't repeat the mistakes of others. - - Help us caption & translate this video! - - http://amara.org/v/FGba/ - video_id: tV7IPygjseI - video_provider: youtube +- id: PL9_jjLrTYxc2uUcqG2wjZ1ppt-TkFG-gm + title: RubyConf AU 2015 + description: "" + published_at: "2017-05-20" + channel_id: UCr38SHAvOKMDyX3-8lhvJHA + year: "2015" + videos_count: 21 + slug: rubyconf-au-2015 + metadata_parser: "Youtube::VideoMetadata::RubyConfAu" # custom parser ``` -If there are any issues or uncertainties, feel free to raise them during the PR process. We appreciate your contribution and look forward to expanding the video content. +### Step 4 - move the data + +Once the data is prepared you can move it to the main `/data` folder diff --git a/script/create_playlists.rb b/script/create_playlists.rb new file mode 100644 index 000000000..8825db4a4 --- /dev/null +++ b/script/create_playlists.rb @@ -0,0 +1,19 @@ +# start this script with the rails runner command +# rails runner script/create_playlists.rb +# +organisations = YAML.load_file("#{Rails.root}/data_preparation/organisations.yml") + +# create a directory for each organisation and add a playlist.yml file +def create_playlists(organisation) + playlists = Youtube::Playlists.new.all(channel_id: organisation["youtube_channel_id"], title_matcher: organisation["playlist_matcher"]) + playlists.sort_by! { |playlist| playlist.year.to_i } + playlists.select! { |playlist| playlist.videos_count.positive? } + + File.write("#{Rails.root}/data_preparation/#{organisation["slug"]}/playlists.yml", playlists.map { |item| item.to_h.stringify_keys }.to_yaml) +end + +# This is the main loop +organisations.each do |organisation| + FileUtils.mkdir_p(File.join("#{Rails.root}/data_preparation", organisation["slug"])) + create_playlists(organisation) +end diff --git a/script/extract_videos.rb b/script/extract_videos.rb new file mode 100644 index 000000000..1d232bd0e --- /dev/null +++ b/script/extract_videos.rb @@ -0,0 +1,33 @@ +# start this script with the rails runner command +# $ rails runner script/extract_videos.rb +# Once you have created the playlists it will retrieve the videos +# + +organisations = YAML.load_file("#{Rails.root}/data_preparation/organisations.yml") + +# for each playlist create a directory and add a videos.yml file +def create_playlist_items(playlist, organisation_slug) + puts "extracting videos for playlist : #{playlist.title}" + playlist_videos = Youtube::PlaylistItems.new.all(playlist_id: playlist.id) + playlist_videos.sort_by! { |video| video.published_at } + + FileUtils.mkdir_p(File.join(Rails.root, "data_preparation", organisation_slug, playlist.slug)) + + # by default we use Youtube::VideoMetadata but in playlists.yml you can specify a different parser + parser = playlist.metadata_parser.constantize + playlist_videos.map! { |metadata| parser.new(metadata: metadata, event_name: playlist.title).cleaned } + + path = "#{File.join(Rails.root, "data_preparation", organisation_slug, playlist.slug)}/videos.yml" + puts "#{playlist_videos.length} videos have ben added to : #{playlist.title}" + File.write(path, playlist_videos.map { |item| item.to_h.stringify_keys }.to_yaml) +end + +# this is the main loop +organisations.each do |organisation| + puts "extracting videos for #{organisation["slug"]}" + playlists = YAML.load_file("#{Rails.root}/data_preparation/#{organisation["slug"]}/playlists.yml").map { |item| OpenStruct.new(item) } + + playlists.each do |playlist| + create_playlist_items(playlist, organisation["slug"]) + end +end diff --git a/script/prepare_organisations.rb b/script/prepare_organisations.rb new file mode 100644 index 000000000..e6445451e --- /dev/null +++ b/script/prepare_organisations.rb @@ -0,0 +1,25 @@ +# start this script with the rails runner command +# $ rails runner script/prepare_organisations.rb +# + +organisations = YAML.load_file("#{Rails.root}/data_preparation/organisations.yml") + +def add_youtube_channel_id(organisation) + return organisation if organisation["youtube_channel_id"].present? + + youtube_channel_id = Youtube::Channels.new.id_by_name(channel_name: organisation["youtube_channel_name"]) + + puts "youtube_channel_id: #{youtube_channel_id} is added to #{organisation["name"]}" + organisation["youtube_channel_id"] = youtube_channel_id + organisation +end +# add youtube_channel_id to organisations if missing +organisations.map! do |organisation| + puts "processing #{organisation["name"]}" + organisation["slug"] ||= organisation["name"].parameterize + add_youtube_channel_id(organisation) +end + +puts "processing all organisations done writing the result to #{Rails.root}/data_preparation/organisations.yml" +# save the Youtube channel id to the data_tmp/organisations.yml file +File.write("#{Rails.root}/data_preparation/organisations.yml", organisations.to_yaml) diff --git a/test/models/event_test.rb b/test/models/event_test.rb index e9efec817..c36706a74 100644 --- a/test/models/event_test.rb +++ b/test/models/event_test.rb @@ -17,7 +17,17 @@ require "test_helper" class EventTest < ActiveSupport::TestCase - # test "the truth" do - # assert true - # end + setup do + @organisation = organisations(:one) + end + + test "validates the country code " do + assert Event.new(name: "test", country_code: "NL", organisation: @organisation).valid? + assert Event.new(name: "test", country_code: "AU", organisation: @organisation).valid? + refute Event.new(name: "test", country_code: "France", organisation: @organisation).valid? + end + + test "allows nil country code" do + assert Event.new(name: "test", country_code: nil, organisation: @organisation).valid? + end end diff --git a/test/models/youtube/video_metadata_rails_worldtest.rb b/test/models/youtube/video_metadata_rails_worldtest.rb new file mode 100644 index 000000000..55db6956f --- /dev/null +++ b/test/models/youtube/video_metadata_rails_worldtest.rb @@ -0,0 +1,29 @@ +# rubocop:disable Layout/LineLength +# == Schema Information +# +# Table name: events +# +# id :integer not null, primary key +# date :date +# city :string +# country_code :string +# organisation_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# name :string default(""), not null +# slug :string default(""), not null +# +# rubocop:enable Layout/LineLength +require "test_helper" + +class Youtube::VideoMetadataRailsWorldTest < ActiveSupport::TestCase + test "remove the event name from the title and preserve the keynote mention" do + metadata = OpenStruct.new({ + title: "Nikita Vasilevsky - Implementing Native Composite Primary Key Support in Rails 7.1 - Rails World '23", + description: "RailsWorld 2023 lorem ipsum" + }) + results = Youtube::VideoMetadataRailsWorld.new(metadata: metadata, event_name: "Rails World 23") + assert_equal results.cleaned.title, "Implementing Native Composite Primary Key Support in Rails 7.1" + refute results.keynote? + end +end diff --git a/test/models/youtube/video_metadata_test.rb b/test/models/youtube/video_metadata_test.rb new file mode 100644 index 000000000..550392665 --- /dev/null +++ b/test/models/youtube/video_metadata_test.rb @@ -0,0 +1,90 @@ +# rubocop:disable Layout/LineLength +# == Schema Information +# +# Table name: events +# +# id :integer not null, primary key +# date :date +# city :string +# country_code :string +# organisation_id :integer not null +# created_at :datetime not null +# updated_at :datetime not null +# name :string default(""), not null +# slug :string default(""), not null +# +# rubocop:enable Layout/LineLength +require "test_helper" + +class Youtube::VideoMetadataTest < ActiveSupport::TestCase + test "remove the event name from the title and preserve the keynote mention" do + metadata = OpenStruct.new({ + title: "RailsConf 2021: Keynote: Eileen Uchitelle - All the Things I Thought I Couldn't Do", + description: "RailsConf 2021 lorem ipsum" + }) + results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RailsConf 2021") + assert_equal results.cleaned.title, "Keynote: Eileen Uchitelle - All the Things I Thought I Couldn't Do" + assert results.keynote? + end + + test "extract mutiple speakers" do + metadata = OpenStruct.new({ + title: "RailsConf 2022 - Spacecraft! The care and keeping of a legacy ... by Annie Lydens & Jenny Allar", + description: "lorem ipsum" + }) + results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RailsConf 2022").cleaned + assert_equal results.title, "Spacecraft! The care and keeping of a legacy ..." + assert_equal ["Annie Lydens", "Jenny Allar"], results.speakers + end + + test "extract mutiple speakers with 'and' in the name" do + metadata = OpenStruct.new({ + title: "RubyConf AU 2013: From Stubbies to Longnecks by Geoffrey Giesemann", + description: "lorem ipsum" + }) + results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RubyConf AU 2013").cleaned + assert_equal results.title, "From Stubbies to Longnecks" + assert_equal ["Geoffrey Giesemann"], results.speakers + end + + test "lighting talks" do + metadata = OpenStruct.new({ + title: "RubyConf AU 2013: Lightning Talks", + description: "lorem ipsum" + }) + + results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RubyConf AU 2013").cleaned + assert_equal results.title, "Lightning Talks" + assert_equal [], results.speakers + end + + test "speaker name containing and" do + metadata = OpenStruct.new({ + title: "RubyConf AU 2017 - Writing a Gameboy emulator in Ruby, by Colby Swandale" + }) + + results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RubyConf AU 2017").cleaned + assert_equal ["Colby Swandale"], results.speakers + assert_equal results.title, "Writing a Gameboy emulator in Ruby" + end + + # test "speaker name containing &" do + # metadata = OpenStruct.new({ + # title: "RubyConf AU 2017 - VR backend rails vs serverless: froth or future? Ram Ramakrishnan & Janet Brown" + # }) + + # results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RubyConf AU 2017").cleaned + # assert_equal ["Ram Ramakrishnan", "Janet Brown"], results.speakers + # assert_equal results.title, "VR backend rails vs serverless: froth or future?" + # end + + # test "By separator should be case insensitive" do + # metadata = OpenStruct.new({ + # title: "RubyConf AU 2017 - Simple and Awesome Database Tricks, By Barrett Clark" + # }) + + # results = Youtube::VideoMetadata.new(metadata: metadata, event_name: "RubyConf AU 2017").cleaned + # assert_equal ["Barrett Clark"], results.speakers + # assert_equal results.title, "Simple and Awesome Database Tricks" + # end +end