Skip to content

Commit

Permalink
rubocop -a
Browse files Browse the repository at this point in the history
  • Loading branch information
tmtmtmtm committed May 10, 2017
1 parent badbd69 commit c5a43ad
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Rakefile
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'rubocop/rake_task'
require 'rake/testtask'
RuboCop::RakeTask.new
Expand All @@ -11,4 +12,4 @@ Rake::TestTask.new do |t|
end

task test: 'test:data'
task default: %w(rubocop test)
task default: %w[rubocop test]
1 change: 1 addition & 0 deletions lib/ex_member_page.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'scraped'
require_relative './member_page'

Expand Down
5 changes: 3 additions & 2 deletions lib/member_page.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'scraped'

class MemberPage < Scraped::HTML
Expand Down Expand Up @@ -41,11 +42,11 @@ class MemberPage < Scraped::HTML
private

def wanted_titles
%w(Dr)
%w[Dr]
end

def unwanted_titles
%w(Hon. MP)
%w[Hon. MP]
end

def titles
Expand Down
1 change: 1 addition & 0 deletions lib/members_page.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'scraped'

class MembersPage < Scraped::HTML
Expand Down
2 changes: 1 addition & 1 deletion scraper.rb
Expand Up @@ -26,4 +26,4 @@ def scrape(h)

# puts data
ScraperWiki.sqliteexecute('DELETE FROM data') rescue nil
ScraperWiki.save_sqlite(%i(id term), data)
ScraperWiki.save_sqlite(%i[id term], data)
1 change: 1 addition & 0 deletions test/ex_member_page_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative './test_helper'
require_relative '../lib/ex_member_page.rb'

Expand Down
1 change: 1 addition & 0 deletions test/member_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative './test_helper'
require_relative '../lib/member_page.rb'

Expand Down
1 change: 1 addition & 0 deletions test/name_and_prefix_test.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require_relative './test_helper'
require_relative '../lib/member_page.rb'

Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
@@ -1,4 +1,5 @@
# frozen_string_literal: true

require 'minitest/around/spec'
require 'minitest/autorun'
require 'pry'
Expand Down

0 comments on commit c5a43ad

Please sign in to comment.