A federal judge ruled Friday that federal fisheries regulators are violating the Endangered Species Act by failing to adequately protect North Atlantic right whales from potentially deadly entanglements in fishing gear, including the rope used by Maine’s lobster fleet.