add license to gemspec
fix to do lock internal data on flush
update gemspec style
Revert "fix to do lock internal data on flush"

This reverts commit 5bae880746a71a5431c18b4ccd964580d2a457ff.