This was not necessarily done by Hamas. Rockets are not hard to get, and other groups have bought them. Anti-Hamas groups have rockets, and they can fire them, too. As the IDF said, Hamas doesn't have complete control over Gaza, and the Israeli intelligence knows that because it has spies in Gaza, but they treat still as Hamas's responsibility.
U.S. says working on initiative to de-escalate Syria fighting, with focus on Aleppo (Reuters)
from the article: Israel warplanes strike Hamas targets following Gaza rocket fire