diff --git a/.gitignore b/.gitignore index 370a5c4..b0c7019 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -.key \ No newline at end of file +.key +.bundle/ +vendor/ diff --git a/Gemfile b/Gemfile index 0a42d6c..f4a1ad6 100644 --- a/Gemfile +++ b/Gemfile @@ -8,4 +8,5 @@ gem 'sinatra' group :development do gem 'rspec' gem 'rack-test' -end \ No newline at end of file +end +gem "rackup", "~> 2.1" diff --git a/Gemfile.lock b/Gemfile.lock index f5a42aa..782755d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,52 +1,70 @@ GEM remote: http://rubygems.org/ specs: - activesupport (6.0.3.1) + activesupport (7.1.3.4) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - concurrent-ruby (1.1.6) - diff-lcs (1.3) - i18n (1.8.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + base64 (0.2.0) + bigdecimal (3.1.8) + concurrent-ruby (1.3.3) + connection_pool (2.4.1) + diff-lcs (1.5.1) + drb (2.2.1) + i18n (1.14.5) concurrent-ruby (~> 1.0) - icalendar (2.5.3) + icalendar (2.10.2) ice_cube (~> 0.16) - icalendar-recurrence (1.1.2) + icalendar-recurrence (1.2.0) icalendar (~> 2.0) - ice_cube (~> 0.13) - ice_cube (0.16.3) - minitest (5.14.1) - mustermann (1.0.3) - rack (2.0.8) - rack-protection (2.0.7) - rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.0) - rspec-support (~> 3.9.0) - rspec-expectations (3.9.0) + ice_cube (~> 0.16) + tzinfo (~> 2.0) + ice_cube (0.17.0) + minitest (5.24.1) + mustermann (3.0.1) + ruby2_keywords (~> 0.0.1) + mutex_m (0.2.0) + rack (3.1.7) + 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 (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rspec (3.13.0) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.0) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.0) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.0) - sinatra (2.0.7) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.7) + rspec-support (~> 3.13.0) + rspec-support (3.13.1) + ruby2_keywords (0.0.5) + 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) - thread_safe (0.3.6) - tilt (2.0.10) - tzinfo (1.2.7) - thread_safe (~> 0.1) - zeitwerk (2.3.0) + tilt (2.4.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + webrick (1.8.1) PLATFORMS ruby @@ -56,8 +74,9 @@ DEPENDENCIES icalendar icalendar-recurrence rack-test + rackup (~> 2.1) rspec sinatra BUNDLED WITH - 2.0.2 + 2.5.14 diff --git a/main.rb b/main.rb index 655813c..8fa3e32 100644 --- a/main.rb +++ b/main.rb @@ -14,7 +14,7 @@ module CalendarLoader JSON_URL = "https://www.googleapis.com/calendar/v3/calendars/#{CALENDAR_ID}/events?singleEvents=true&maxResults=2500&orderBy=startTime&key=#{GCAL_API_KEY}" def self.body - open(JSON_URL) + URI.open(JSON_URL) end end