From 406aff999c6217b97152a76ed6394f6cd8807b3a Mon Sep 17 00:00:00 2001 From: Ike Date: Sat, 16 Mar 2024 02:30:06 +0100 Subject: [PATCH 1/2] Export start/end time of conferences as well --- lib/eventkalender/parser/conferences.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/eventkalender/parser/conferences.rb b/lib/eventkalender/parser/conferences.rb index 82fecea..76e1b4f 100644 --- a/lib/eventkalender/parser/conferences.rb +++ b/lib/eventkalender/parser/conferences.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'date' + class Eventkalender class Parser::Conferences < Eventkalender::Parser def initialize(event_table) @@ -44,8 +46,8 @@ def to_event(table_row) # Return nil if dates are not set return nil if raw_event[3].text.empty? || raw_event[2].text.empty? - start_date = self.class.date(raw_event[2].text) # Start date - end_date = self.class.date(raw_event[3].text) # End date + start_date = DateTime.parse(raw_event[2].text) # Start date + end_date = DateTime.parse(raw_event[3].text) # End date buildup = self.class.date(raw_event[9].text) teardown = self.class.date(raw_event[10].text) return nil if start_date.nil? || end_date.nil? From df0751afd0d332375348bf9c52924abcb4278beb Mon Sep 17 00:00:00 2001 From: Ike Date: Sat, 16 Mar 2024 02:31:28 +0100 Subject: [PATCH 2/2] Update dependencies for current ruby version --- Gemfile | 12 ++-- Gemfile.lock | 173 ++++++++++++++++++++++++++++----------------------- 2 files changed, 101 insertions(+), 84 deletions(-) diff --git a/Gemfile b/Gemfile index 2e2f888..806eeb4 100644 --- a/Gemfile +++ b/Gemfile @@ -6,19 +6,21 @@ gem 'rake', '~> 13.0.0' # webframework gem 'haml', '~> 5.1.2' gem 'sass', '~> 3.7.4' -gem 'sinatra', '~> 2.0.7' -gem 'sinatra-contrib', '~> 2.0.7' +gem 'sinatra', '~> 4.0.0' +gem 'sinatra-contrib', '~> 4.0.0' # ical lib gem 'icalendar', '~> 2.5.3' # parsing -gem 'mechanize', '~> 2.7.7' +gem 'mechanize', '~> 2.10.0' +gem 'rss', '~> 0.3.0' +gem 'rackup', '~> 2.1.0' group :development do gem 'addressable', '~> 2.8.0' # 1.9.3 force gem 'inch', '~> 0.8.0' - gem 'mime-types', '~> 3.2.2' # 1.9.3 force + gem 'mime-types', '~> 3.5.2' gem 'nokogiri', '~> 1.13.4' - gem 'rack', '~> 2.1.4' + gem 'rack', '~> 3.0.9' gem 'rack-test', '~> 0.6.3' gem 'rspec', '~> 3.8.0' gem 'rubocop', '~> 0.76.0' diff --git a/Gemfile.lock b/Gemfile.lock index 259521e..91dc263 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,78 +1,91 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) - ast (2.4.0) - backports (3.15.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + ast (2.4.2) + base64 (0.2.0) + bigdecimal (3.1.6) bond (0.5.1) - coderay (1.1.2) - connection_pool (2.2.3) - crack (0.4.3) - safe_yaml (~> 1.0.0) - diff-lcs (1.3) - docile (1.3.2) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - ffi (1.11.2) + coderay (1.1.3) + connection_pool (2.4.1) + crack (1.0.0) + bigdecimal + rexml + diff-lcs (1.5.1) + docile (1.4.0) + domain_name (0.6.20240107) + ffi (1.16.3) haml (5.1.2) temple (>= 0.8.0) tilt - hashdiff (1.0.0) - http-cookie (1.0.3) + hashdiff (1.1.0) + http-cookie (1.0.5) domain_name (~> 0.5) icalendar (2.5.3) ice_cube (~> 0.16) - ice_cube (0.16.3) + ice_cube (0.16.4) inch (0.8.0) pry sparkr (>= 0.2.0) term-ansicolor yard (~> 0.9.12) - jaro_winkler (1.5.4) - json (2.5.1) - mechanize (2.7.7) - domain_name (~> 0.5, >= 0.5.1) - http-cookie (~> 1.0) - mime-types (>= 1.17.2) - net-http-digest_auth (~> 1.1, >= 1.1.1) - net-http-persistent (>= 2.5.2) - nokogiri (~> 1.6) - ntlm-http (~> 0.1, >= 0.1.1) + jaro_winkler (1.5.6) + json (2.7.1) + mechanize (2.10.0) + addressable (~> 2.8) + base64 + domain_name (~> 0.5, >= 0.5.20190701) + http-cookie (~> 1.0, >= 1.0.3) + mime-types (~> 3.0) + net-http-digest_auth (~> 1.4, >= 1.4.1) + net-http-persistent (>= 2.5.2, < 5.0.dev) + nkf + nokogiri (~> 1.11, >= 1.11.2) + rubyntlm (~> 0.6, >= 0.6.3) webrick (~> 1.7) - webrobots (>= 0.0.9, < 0.2) - method_source (0.9.2) - mime-types (3.2.2) + webrobots (~> 0.1.2) + method_source (1.0.0) + mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2020.1104) - mini_portile2 (2.8.0) - multi_json (1.14.1) - mustermann (1.0.3) + mime-types-data (3.2024.0305) + mini_portile2 (2.8.5) + multi_json (1.15.0) + mustermann (3.0.0) + ruby2_keywords (~> 0.0.1) net-http-digest_auth (1.4.1) - net-http-persistent (4.0.1) + net-http-persistent (4.0.2) connection_pool (~> 2.2) - nokogiri (1.13.4) + nkf (0.2.0) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) - ntlm-http (0.1.1) - parallel (1.19.0) - parser (2.6.5.0) - ast (~> 2.4.0) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - public_suffix (4.0.6) - racc (1.6.0) - rack (2.1.4) - rack-protection (2.0.7) - rack + parallel (1.24.0) + parser (3.3.0.5) + ast (~> 2.4.1) + racc + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + public_suffix (5.0.4) + racc (1.7.3) + rack (3.0.9.1) + rack-protection (4.0.0) + base64 (>= 0.1.0) + rack (>= 3.0.0, < 4) + rack-session (2.0.0) + rack (>= 3.0.0) rack-test (0.6.3) rack (>= 1.0) - rainbow (3.0.0) - rake (13.0.1) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) ffi (~> 1.0) + rexml (3.2.6) ripl (0.7.1) bond (~> 0.5.1) ripl-multi_line (0.3.1) @@ -94,6 +107,8 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-support (3.8.3) + rss (0.3.0) + rexml rubocop (0.76.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) @@ -101,8 +116,9 @@ GEM rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - ruby-progressbar (1.10.1) - safe_yaml (1.0.5) + ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) + rubyntlm (0.6.3) sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -113,65 +129,64 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sinatra (2.0.7) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.7) + sinatra (4.0.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.0.0) + rack-session (>= 2.0.0, < 3) tilt (~> 2.0) - sinatra-contrib (2.0.7) - backports (>= 2.8.2) - multi_json - mustermann (~> 1.0) - rack-protection (= 2.0.7) - sinatra (= 2.0.7) + sinatra-contrib (4.0.0) + multi_json (>= 0.0.2) + mustermann (~> 3.0) + rack-protection (= 4.0.0) + sinatra (= 4.0.0) tilt (~> 2.0) sparkr (0.4.1) - temple (0.8.2) + temple (0.10.3) term-ansicolor (1.7.1) tins (~> 1.0) - tilt (2.0.10) + tilt (2.3.0) tins (1.20.3) tux (0.3.0) ripl (>= 0.3.5) ripl-multi_line (>= 0.2.4) ripl-rack (>= 0.2.0) sinatra (>= 1.2.1) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.6.0) + unicode-display_width (1.6.1) webmock (3.5.1) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff - webrick (1.7.0) + webrick (1.8.1) webrobots (0.1.2) - yard (0.9.20) + yard (0.9.36) PLATFORMS - ruby + x86_64-linux DEPENDENCIES addressable (~> 2.8.0) haml (~> 5.1.2) icalendar (~> 2.5.3) inch (~> 0.8.0) - mechanize (~> 2.7.7) - mime-types (~> 3.2.2) + mechanize + mime-types nokogiri (~> 1.13.4) - rack (~> 2.1.4) - rack-test (~> 0.6.3) + rack + rack-test + rackup rake (~> 13.0.0) rspec (~> 3.8.0) + rss rubocop (~> 0.76.0) sass (~> 3.7.4) simplecov (~> 0.16.1) - sinatra (~> 2.0.7) - sinatra-contrib (~> 2.0.7) + sinatra + sinatra-contrib term-ansicolor (~> 1.7.1) tins (~> 1.20.2) tux (~> 0.3.0) webmock (~> 3.5.1) BUNDLED WITH - 1.17.2 + 2.4.10