Since these files didn't have shebangs, rubocop didn't look at them.
Once it started looking it found a bunch of stuff it didn't like, but
the original commit where they were written is already merged, so I'm
fixing those issues here.
@@ -6,17 +6,19 @@
# run this after looking into why
# Theoretically they could be piped together directly for automated fixing
-require 'redis'
+require "redis"
redis = Redis.new
-customer_id = ENV['DEFAULT_CUSTOMER_ID']
+customer_id = ENV["DEFAULT_CUSTOMER_ID"]
unless customer_id
- puts "The env-var DEFAULT_CUSTOMER_ID must be set to the ID of the customer who will receive the duplicated addrs, preferably a support customer or something linked to notifications when stray money is sent to these addresses"
+ puts "The env-var DEFAULT_CUSTOMER_ID must be set to the ID of the customer "\
+ "who will receive the duplicated addrs, preferably a support customer or "\
+ "something linked to notifications when stray money is sent to these "\
+ "addresses"
exit 1
end
-
STDIN.each_line do |line|
match = line.match(/^(\w+) is used by the following \d+ keys: (.*)/)
unless match
@@ -1,13 +1,13 @@
#!/usr/bin/ruby
# frozen_string_literal: true
-require 'redis'-require_relative '../lib/redis_addresses'
+require "redis"
+require_relative "../lib/redis_addresses"
redis = Redis.new
get_addresses_with_users(redis).each do |addr, keys|
if keys.length > 1
- puts "#{addr} is used by the following #{keys.length} keys: #{keys.join(" ")}"
+ puts "#{addr} is used by the following #{keys.length} keys: #{keys.join(' ')}"
end
end