diff --git a/Gemfile b/Gemfile index aa181fd..078e40a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '2.4.2' +ruby '2.7.3' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") @@ -8,7 +8,7 @@ end gem 'rails', '~> 5.2.0' gem 'pg', '~> 0.19.0' -gem 'puma', '~> 3.12.4' +gem 'puma', '~> 3.12.6' gem 'sass-rails', '~> 5.0' gem 'coffee-rails', '~> 4.2.1' gem 'jquery-rails', '~> 4.2.2' diff --git a/Gemfile.lock b/Gemfile.lock index eb3e8e0..799c1a8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/zaimramlan/figaro.git - revision: ac49f61f139a0f6b60e03d6ad24b204475907a17 + revision: fd4156296daf0fcc0ac97ed3f7867daa296845f0 specs: figaro (1.1.1) thor (~> 0.14) @@ -8,51 +8,51 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (5.2.3) - actionpack (= 5.2.3) + actioncable (5.2.5) + actionpack (= 5.2.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.3) - actionpack (= 5.2.3) - actionview (= 5.2.3) - activejob (= 5.2.3) + actionmailer (5.2.5) + actionpack (= 5.2.5) + actionview (= 5.2.5) + activejob (= 5.2.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.3) - actionview (= 5.2.3) - activesupport (= 5.2.3) - rack (~> 2.0) + actionpack (5.2.5) + actionview (= 5.2.5) + activesupport (= 5.2.5) + rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.3) - activesupport (= 5.2.3) + actionview (5.2.5) + activesupport (= 5.2.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.3) - activesupport (= 5.2.3) + activejob (5.2.5) + activesupport (= 5.2.5) globalid (>= 0.3.6) - activemodel (5.2.3) - activesupport (= 5.2.3) - activerecord (5.2.3) - activemodel (= 5.2.3) - activesupport (= 5.2.3) + activemodel (5.2.5) + activesupport (= 5.2.5) + activerecord (5.2.5) + activemodel (= 5.2.5) + activesupport (= 5.2.5) arel (>= 9.0) - activestorage (5.2.3) - actionpack (= 5.2.3) - activerecord (= 5.2.3) - marcel (~> 0.3.1) - activesupport (5.2.3) + activestorage (5.2.5) + actionpack (= 5.2.5) + activerecord (= 5.2.5) + marcel (~> 1.0.0) + activesupport (5.2.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) arel (9.0.0) - awesome_print (1.8.0) + awesome_print (1.9.2) bindex (0.8.1) - builder (3.2.3) + builder (3.2.4) byebug (9.1.0) coffee-rails (4.2.2) coffee-script (>= 2.2.0) @@ -61,20 +61,20 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.5) - crass (1.0.5) - erubi (1.9.0) + concurrent-ruby (1.1.8) + crass (1.0.6) + erubi (1.10.0) execjs (2.7.0) - ffi (1.11.2) + ffi (1.15.0) globalid (0.4.2) activesupport (>= 4.2.0) httparty (0.16.4) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.7.0) + i18n (1.8.10) concurrent-ruby (~> 1.0) - jbuilder (2.9.1) - activesupport (>= 4.2.0) + jbuilder (2.11.2) + activesupport (>= 5.0.0) jquery-rails (4.2.2) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -82,58 +82,58 @@ GEM listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - loofah (2.3.1) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - method_source (0.9.2) - mime-types (3.3) + marcel (1.0.1) + method_source (1.0.0) + mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2019.1009) - mimemagic (0.3.3) - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.13.0) + mime-types-data (3.2021.0225) + mini_mime (1.1.0) + mini_portile2 (2.5.0) + minitest (5.14.4) multi_xml (0.6.0) - newrelic_rpm (6.7.0.359) - nio4r (2.5.2) - nokogiri (1.10.5) - mini_portile2 (~> 2.4.0) + newrelic_rpm (6.15.0) + nio4r (2.5.7) + nokogiri (1.11.3) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) pg (0.19.0) - puma (3.12.4) - rack (2.0.7) + puma (3.12.6) + racc (1.5.2) + rack (2.2.3) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.3) - actioncable (= 5.2.3) - actionmailer (= 5.2.3) - actionpack (= 5.2.3) - actionview (= 5.2.3) - activejob (= 5.2.3) - activemodel (= 5.2.3) - activerecord (= 5.2.3) - activestorage (= 5.2.3) - activesupport (= 5.2.3) + rails (5.2.5) + actioncable (= 5.2.5) + actionmailer (= 5.2.5) + actionpack (= 5.2.5) + actionview (= 5.2.5) + activejob (= 5.2.5) + activemodel (= 5.2.5) + activerecord (= 5.2.5) + activestorage (= 5.2.5) + activesupport (= 5.2.5) bundler (>= 1.3.0) - railties (= 5.2.3) + railties (= 5.2.5) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (5.2.3) - actionpack (= 5.2.3) - activesupport (= 5.2.3) + railties (5.2.5) + actionpack (= 5.2.5) + activesupport (= 5.2.5) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) - rake (13.0.1) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rake (13.0.3) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) sass (3.7.4) sass-listen (~> 4.0.0) @@ -146,14 +146,14 @@ GEM sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - spring (2.1.0) + spring (2.1.1) spring-watcher-listen (2.0.1) listen (>= 2.7, < 4.0) spring (>= 1.2, < 3.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) @@ -163,7 +163,7 @@ GEM turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) uglifier (4.2.0) execjs (>= 0.3.0, < 3) @@ -172,9 +172,9 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - websocket-driver (0.7.1) + websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) + websocket-extensions (0.1.5) PLATFORMS ruby @@ -191,7 +191,7 @@ DEPENDENCIES newrelic_rpm nokogiri pg (~> 0.19.0) - puma (~> 3.12.4) + puma (~> 3.12.6) rails (~> 5.2.0) sass-rails (~> 5.0) spring (~> 2.0) @@ -201,7 +201,7 @@ DEPENDENCIES web-console (>= 3.3.0) RUBY VERSION - ruby 2.4.2p198 + ruby 2.7.3p183 BUNDLED WITH - 1.16.1 + 2.2.15 diff --git a/lib/tasks/esolat/v2/scrapetimes.rake b/lib/tasks/esolat/v2/scrapetimes.rake index a0b1eba..c02b077 100644 --- a/lib/tasks/esolat/v2/scrapetimes.rake +++ b/lib/tasks/esolat/v2/scrapetimes.rake @@ -7,16 +7,18 @@ namespace :esolat do include Helpers::V2 # destroy all existing records to prevent duplicates - PrayerTime.destroy_all + PrayerTime.destroy_all puts '================== SCRAPING STARTED ===================' zone_codes = Zone.codes hash = Hash.new zone_codes.each do |code| + puts 'SCRAPING ZONE: ' + code + url = ENV['MAIN_PRAYER_TIMES_URL'] + code response = perform_request(url) - + data = response.parsed_response['prayerTime'].first prayer_times = Hash.new