Skip to content

Commit

Permalink
Merge pull request #109 from ivgiuliani/dependabot/bundler/rubocop-0.…
Browse files Browse the repository at this point in the history
…54.0

Bump rubocop from 0.52.1 to 0.54.0
  • Loading branch information
ivgiuliani authored Mar 31, 2018
2 parents 33fd7e7 + 67a2c35 commit 07c7fb8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ group :development do

gem "factory_bot", "~> 4.8.2"
gem "rspec", "~> 3.7.0"
gem "rubocop", "~> 0.52.1"
gem "rubocop", "~> 0.54.0"
gem "webmock", "~> 3.3.0"
end

Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ GEM
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.3.0)
ast (2.4.0)
concurrent-ruby (1.0.5)
crack (0.4.3)
safe_yaml (~> 1.0.0)
Expand Down Expand Up @@ -51,8 +51,8 @@ GEM
opus-ruby (1.0.1)
ffi
parallel (1.12.1)
parser (2.4.0.2)
ast (~> 2.3)
parser (2.5.0.5)
ast (~> 2.4.0)
powerpack (0.1.1)
prius (2.0.0)
public_suffix (3.0.1)
Expand All @@ -79,9 +79,9 @@ GEM
rspec-support (3.7.0)
rspec_junit_formatter (0.3.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.52.1)
rubocop (0.54.0)
parallel (~> 1.10)
parser (>= 2.4.0.2, < 3.0)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
Expand Down Expand Up @@ -125,7 +125,7 @@ DEPENDENCIES
rake
rspec (~> 3.7.0)
rspec_junit_formatter (= 0.3.0)
rubocop (~> 0.52.1)
rubocop (~> 0.54.0)
rufus-scheduler (~> 3.4.2)
sentry-raven (~> 2.7.2)
songkick-transport (~> 1.11.0)
Expand Down
15 changes: 7 additions & 8 deletions app/tfl/data/update.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

require "open-uri"
require "net/http"
require "json"

# rubocop:disable Metrics/LineLength
Expand All @@ -19,19 +19,18 @@
].freeze
# rubocop:enable Metrics/LineLength

DOWNLOADS.each do |download|
url, output, type = *download

DOWNLOADS.each do |url, output, type|
$stdout.puts "Downloading #{url} => #{output}"

case type
when :json
open(output, "w") do |file|
file << JSON.pretty_generate(JSON.parse(open(url).read)) << "\n"
File.open(output, "w") do |file|
content = Net::HTTP.get(URI(url))
file << JSON.pretty_generate(JSON.parse(content)) << "\n"
end
when :xml
stream = open(url)
IO.copy_stream(stream, output)
content = Net::HTTP.get(URI(url))
File.write(output, content)
else
raise ArgumentError, "Invalid type"
end
Expand Down
4 changes: 2 additions & 2 deletions app/tfl/scraping/press_releases_feed.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "open-uri"
require "net/http"
require "nokogiri"

module Tfl
Expand Down Expand Up @@ -31,7 +31,7 @@ def update!(raw_html: nil)
private

def download_content
open(PRESS_RELEASES_URL).read
Net::HTTP.get(URI(PRESS_RELEASES_URL))
end

def parse_content(content)
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

$LOAD_PATH.unshift File.expand_path("../../app", __FILE__)
$LOAD_PATH.unshift File.expand_path("../app", __dir__)

ENV["DISCORD_CLIENT_ID"] = "12345678901234567"
ENV["DISCORD_TOKEN"] = "t0k3nt0k3nt0k3nt0k3nt0k3n.1234hrx0rz1234token"
Expand Down

0 comments on commit 07c7fb8

Please sign in to comment.